const gr = Gr;
function Ur() {
  const s = ["3000912uBxZjX", "872471IMJUaa", "9zxKeDu", "cross", "2513435CUIitb", "34002WDhyzZ", "projection", "10842184GgZAoB", "3fVRngt", "10967SJRJJT", "dot", "3737550xnFzCW", "19270kJxdXT", "1183nZRDsP"];
  return (Ur = function() {
    return s;
  })();
}
function Sa(s, t, e) {
  return s[0] = t[0] * e, s[1] = t[1] * e, s;
}
function ka(s, t) {
  return s[0] * t[0] + s[1] * t[1];
}
function Gr(s, t) {
  const e = Ur();
  return (Gr = function(n, r) {
    return e[n -= 481];
  })(s, t);
}
(function() {
  const s = Gr, t = Ur();
  for (; ; )
    try {
      if (parseInt(s(487)) / 1 + parseInt(s(483)) / 2 * (parseInt(s(494)) / 3) + -parseInt(s(486)) / 4 + parseInt(s(490)) / 5 + parseInt(s(491)) / 6 * (-parseInt(s(485)) / 7) + -parseInt(s(493)) / 8 * (-parseInt(s(488)) / 9) + parseInt(s(484)) / 10 * (-parseInt(s(481)) / 11) === 970036)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class j {
}
j.multiplyC = Sa, j.scale = function(s, t, e) {
  return s[0] = t[0] * e, s[1] = t[1] * e, s;
}, j.len = function(s) {
  return Math.sqrt(s[0] * s[0] + s[1] * s[1]);
}, j.negate = function(s, t) {
  return s[0] = -t[0], s[1] = -t[1], s;
}, j.add = function(s, t, e) {
  return s[0] = t[0] + e[0], s[1] = t[1] + e[1], s;
}, j.normalize = function(s, t) {
  if (t[0] == 0 && t[1] == 0)
    return s[0] = 0, s[1] = 0, s;
  let e = Math.sqrt(t[0] * t[0] + t[1] * t[1]);
  return e == 0 ? (s[0] = 0, s[0] = 0, s) : (s[0] = t[0] / e, s[1] = t[1] / e, s);
}, j[gr(482)] = ka, j[gr(492)] = function(s, t, e) {
  return Sa(s, e, ka(t, e)), s;
}, j[gr(489)] = function(s, t) {
  return s[0] * t[1] - s[1] * t[0];
};
const V = qr;
function Vr() {
  const s = ["18410aFkxbl", "40jSneOI", "move", "11OVJgrd", "449577SgfKJH", "2.6.17_试用版", "center", "BezierLink", "mid", "left", "1825452pEpLaw", "com.jtopo.AutoFoldLink.center", "346752TCSvGC", "com.jtopo.QuadBezierLink.center", "481160uhmJhQ", "ctrlPoint2", "begin", "freeze", "fold1Offset", "auto", "ne-resize", "mid1", "fold1", "middle", "72scZTdb", "26zgodlN", "centerOffset", "normalize", "w-resize", "QuadBezierLink", "10493LuEtLd", "hand", "8eZkJzU", "755067kVCwXN"];
  return (Vr = function() {
    return s;
  })();
}
(function() {
  const s = qr, t = Vr();
  for (; ; )
    try {
      if (-parseInt(s(282)) / 1 * (-parseInt(s(277)) / 2) + parseInt(s(285)) / 3 + parseInt(s(284)) / 4 * (-parseInt(s(266)) / 5) + parseInt(s(264)) / 6 + -parseInt(s(286)) / 7 * (-parseInt(s(276)) / 8) + parseInt(s(290)) / 9 * (-parseInt(s(287)) / 10) + parseInt(s(289)) / 11 * (parseInt(s(296)) / 12) === 229405)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Ws = V(291), Jt = Object.freeze({ drag: "drag", edit: "edit", normal: "normal", select: "select", view: "view", paint: "paint" }), it = Object.freeze({ grabbing: "grabbing", default: "default", grab: "grab", auto: V(271), move: V(288), hand: V(283), crosshair: "crosshair", s_resize: "s-resize", n_resize: "n-resize", w_resize: V(280), e_resize: "e-resize", ne_resize: V(272), se_resize: "se-resize", sw_resize: "sw-resize", nw_resize: "nw-resize" }), Bt = Object[V(269)]({ horizontal: "horizontal", vertical: "vertical", h: "h", v: "v", anticlockwise: "anticlockwise", clockwise: "clockwise" }), te = Object.freeze({ lt: "lt", ct: "ct", rt: "rt", lm: "lm", rm: "rm", lb: "lb", cb: "cb", rb: "rb", center: "center" });
function qr(s, t) {
  const e = Vr();
  return (qr = function(n, r) {
    return e[n -= 263];
  })(s, t);
}
const Ht = te, Zt = Object.freeze({ lt: "lt", ct: "ct", rt: "rt", lm: "lm", rm: "rm", lb: "lb", cb: "cb", rb: "rb", center: "center", auto: "auto" }), Ns = { lt: [-1, -1], ct: [0, -1], rt: [1, -1], rm: [1, 0], rb: [1, 1], cb: [0, 1], lb: [-1, 1], lm: [-1, 0], center: [0, 0] }, Kr = {};
for (let s in Ns) {
  let t = Ns[s];
  Kr[s] = j[V(279)]([], t);
}
const Mt = Object.freeze({ left: V(295), center: "center", right: "right" }), zt = Object.freeze({ top: "top", middle: V(275), bottom: "bottom" }), Z = Object.freeze({ begin: V(268), end: "end", middle: V(275), ctrlPoint: "ctrlPoint", ctrlPoint1: "ctrlPoint1", ctrlPoint2: "ctrlPoint2", fold1: "fold1", fold2: "fold2", mid: V(294), mid1: V(273), mid2: "mid2" }), Dt = Object[V(269)]({ QuadBezierLink: V(281), BezierLink: V(293), AutoFoldLink: "AutoFoldLink", ArcLink: "ArcLink", fold1Offset: V(270), fold2Offset: "fold2Offset", centerOffset: V(278) }), et = Object.freeze({ AutoFoldLinkCenter: V(263), AutoFoldLinkFold1: V(274), AutoFoldLinkFold2: "fold2", LinkCenter: V(292), LinkBegin: "begin", LinkEnd: "end", QuadBezierLinkCtrlPoint: "ctrlPoint", BezierLinkCtrlPoint1: "ctrlPoint1", BezierLinkCtrlPoint2: V(267), QuadBezierLinkCenter: V(265), BezierLinkCenter: "com.jtopo.BezierLink.center", ArcLinkCenter: "com.jtopo.ArcLink.center" }), Eh = Object.freeze({ AutoFoldLinkAnchors: "com.jtopo.AutoFoldLinkAnchors" }), Th = [0, 0], Un = Zr;
function Zr(s, t) {
  const e = Qr();
  return (Zr = function(n, r) {
    return e[n -= 486];
  })(s, t);
}
function p(s) {
  return (t, e) => {
    t[e] = s;
  };
}
(function() {
  const s = Zr, t = Qr();
  for (; ; )
    try {
      if (-parseInt(s(487)) / 1 + parseInt(s(500)) / 2 + parseInt(s(499)) / 3 * (-parseInt(s(492)) / 4) + -parseInt(s(497)) / 5 * (-parseInt(s(493)) / 6) + parseInt(s(496)) / 7 + parseInt(s(489)) / 8 + parseInt(s(491)) / 9 * (-parseInt(s(495)) / 10) === 594195)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})(), !Array.prototype.includes && Object.defineProperty(Array.prototype, "includes", { value: function(s) {
  return this.indexOf(s) != -1;
} });
const Q = Object.freeze({ Dev_mode: Ws[Un(494)]("#"), MinDeep: 1, MaxLayerCount: 20, DefaultPackage: "com.jtopo", EventInstances: { touchmoveEvent: new InputEvent("touchmove"), pointerdownEvent: new InputEvent("pointerdown"), pointerupEvent: new InputEvent("pointerup"), pointermoveEvent: new InputEvent("pointermove"), pointerenterEvent: new InputEvent("pointerenter"), pointeroutEvent: new InputEvent("pointerout"), clickEvent: new InputEvent("click"), dblclickEvent: new InputEvent("dblclick"), dragEvent: new InputEvent("drag"), dragEndEvent: new InputEvent(Un(498)), dropoverEvent: new InputEvent("dropover"), dropEvent: new InputEvent("drop"), dropoutEvent: new InputEvent("dropout"), selectedEvent: new InputEvent("selected"), unselectedEvent: new InputEvent("unselected") }, AutoFoldLinkAbsorb: 3 }), Rs = Object[Un(490)]({ HandlerLayerCanvas: 99, FullWindowDom: 1e3, Link: 1, Node: 1 }), Me = Object.freeze({ DefaultFont: Un(486), DefaultFontSize: "12px", PointClosestEpsilon: 0.01, DefaultLightName: Un(488), DefaultDarkName: "DefaultDark", supportGIF: !1 });
function Qr() {
  const s = ["2980332AlSsKb", "460FJxJlz", "815208vsGiWb", "startsWith", "10qPCMwE", "181125eRLIKk", "10rFsrds", "dragend", "3507OSmEbt", "1099254hPQKYe", "12px sans-serif", "924252jKcwZD", "DefaultLight", "9094336Cjkctn", "freeze"];
  return (Qr = function() {
    return s;
  })();
}
const dt = $r;
function $r(s, t) {
  const e = ti();
  return ($r = function(n, r) {
    return e[n -= 302];
  })(s, t);
}
function ti() {
  const s = ["looksSame", "abs", "929dOtWkx", "lerp", "atan2", "length", "isLikePoint", "1090JxmWPA", "keys", "cos", "387ctHsjr", "push", "normalize", "distance", "createPoints", "sqrt", "createPointsBidirectional", "6349605wPpADV", "distancePoint", "21766921CsiNEJ", "1238700KUnoqH", "16877320pESGgU", "PointClosestEpsilon", "sin", "8GZPpxm", "21hWEUWy", "145520SkwGWo", "1048830CkRvLK"];
  return (ti = function() {
    return s;
  })();
}
(function() {
  const s = $r, t = ti();
  for (; ; )
    try {
      if (-parseInt(s(314)) / 1 * (-parseInt(s(319)) / 2) + parseInt(s(311)) / 3 * (-parseInt(s(308)) / 4) + parseInt(s(329)) / 5 + parseInt(s(304)) / 6 * (-parseInt(s(309)) / 7) + -parseInt(s(310)) / 8 * (-parseInt(s(322)) / 9) + parseInt(s(305)) / 10 + -parseInt(s(303)) / 11 === 948747)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class A {
  static [dt(318)](t) {
    const e = dt;
    return Object[e(320)](t)[e(317)] == 2 && t.x != null && t.y != null;
  }
  static [dt(312)](t, e, n) {
    if (t === e)
      return !0;
    let r = Math.abs(e.x - t.x), i = Math.abs(e.y - t.y);
    return n == null && (n = 0.01), r < n && i < n;
  }
  static middle(t, e) {
    return { x: (e.x + t.x) / 2, y: (e.y + t.y) / 2 };
  }
  static getAngle(t, e, n, r) {
    return Math[dt(316)](r - e, n - t);
  }
  static rotate(t, e, n, r, i) {
    const o = dt;
    return { x: (t - n) * Math[o(321)](i) - (e - r) * Math[o(307)](i) + n, y: (t - n) * Math.sin(i) + (e - r) * Math[o(321)](i) + r };
  }
  static distance(t, e, n, r) {
    return Math[dt(327)]((n - t) * (n - t) + (r - e) * (r - e));
  }
  static [dt(302)](t, e) {
    let n = e.x - t.x, r = e.y - t.y;
    return Math.sqrt(n * n + r * r);
  }
  static mergeClosestPoints(t, e = Me[dt(306)]) {
    const n = dt;
    let r = [t[0]];
    for (let i = 1; i < t.length - 1; i++) {
      let o = r[r.length - 1], a = t[i], h = t[i + 1];
      if (a.x === h.x && a.y === h.y)
        continue;
      let l = j[n(324)]([], [a.x - o.x, a.y - o.y]), c = j.normalize([], [h.x - a.x, h.y - a.y]);
      Math[n(313)](l[0] - c[0]) < e && Math[n(313)](l[1] - c[1]) < e || r.push(a);
    }
    return r[n(323)](t[t[n(317)] - 1]), r;
  }
  static forward(t, e, n) {
    let r = Math.atan2(e.y - t.y, e.x - t.x);
    return { x: t.x + n * Math.cos(r), y: t.y + n * Math.sin(r) };
  }
  static offsetWithAngle(t, e, n) {
    const r = dt;
    return typeof n == "number" && (n = { x: Math.cos(e) * n, y: Math[r(307)](e) * n }), { x: t.x + n.x, y: t.y + n.y };
  }
  static createPoints(t, e, n = 1, r = !1) {
    const i = r ? [t] : [], o = r ? n - 1 : n;
    let a = t;
    for (let h = 0; h < o; h++) {
      const l = { x: a.x + e[0], y: a.y + e[1] };
      i.push(l), a = l;
    }
    return i;
  }
  static [dt(328)](t, e, n) {
    const r = dt;
    if (n == 0)
      return [];
    const i = [-e[0], -e[1]];
    if (n % 2 == 0) {
      const h = [e[0] / 2, e[1] / 2], l = { x: t.x - h[0], y: t.y - h[1] }, c = { x: t.x + h[0], y: t.y + h[1] }, u = A.createPoints(l, i, n / 2, !0), d = A.createPoints(c, e, n / 2, !0);
      return u.concat(d);
    }
    const o = A.createPoints(t, i, (n - 1) / 2 + 1, !0), a = A[r(326)](t, e, (n - 1) / 2, !1);
    return o.concat(a);
  }
  static [dt(315)](t, e, n) {
    return { x: (e.x - t.x) * n + t.x, y: (e.y - t.y) * n + t.y };
  }
  static sumDistance(t, e) {
    const n = dt;
    let r = t.length;
    if (r < 2)
      throw new Error("points.length < 2");
    let i = t[0], o = t[r - 1];
    if (t.length == 2)
      return A.distance(i.x, i.y, o.x, o.y);
    let a = 0;
    for (let h = 1; h < r; h++)
      a += A[n(302)](t[h - 1], t[h]);
    return e && (a += A[n(325)](o.x, o.y, i.x, i.y)), a;
  }
  static lerpOnLines(t, e, n) {
    const r = dt;
    let i = t.length;
    if (t.length < 2)
      throw new Error("points.length < 2");
    let o = t[0], a = t[t.length - 1];
    if (t.length == 2)
      return A[r(315)](o, a, e);
    if (e < 0)
      return A.lerp(t[0], t[1], e);
    if (e > 1)
      return n ? A[r(315)](t[i - 1], t[0], e) : A[r(315)](t[t[r(317)] - 2], t[t.length - 1], e);
    let h = A.sumDistance(t, n) * e, l = 0;
    for (let c = 1; c < i; c++) {
      let u = A.distancePoint(t[c - 1], t[c]);
      if (h >= l && h <= l + u) {
        let d = (h - l) / u;
        return A.lerp(t[c - 1], t[c], d);
      }
      l += u;
    }
    if (n) {
      let c = A.distancePoint(t[i - 1], t[0]);
      if (h >= l && h <= l + c) {
        let u = (h - l) / c;
        return A[r(315)](t[i - 1], t[0], u);
      }
    }
    throw console.log(t, e), new Error("assert error betweenPoints");
  }
}
const Wt = Fs;
function ei() {
  const s = ["632090OrsyZm", "scale", "translate", "rotateByXY", "117EVrPec", "1717585bDcsvV", "rotate", "transform", "85002ZtUoYJ", "invert", "1579428btavEj", "slice", "602382zdVyvq", "3NZGpwN", "multiply", "795763FrkGwm", "371gNgMzu", "fillFrom", "1325760YtHRbn", "point", "points"];
  return (ei = function() {
    return s;
  })();
}
function Fs(s, t) {
  const e = ei();
  return (Fs = function(n, r) {
    return e[n -= 201];
  })(s, t);
}
(function() {
  const s = Fs, t = ei();
  for (; ; )
    try {
      if (parseInt(s(205)) / 1 + -parseInt(s(202)) / 2 + parseInt(s(203)) / 3 * (parseInt(s(221)) / 4) + -parseInt(s(216)) / 5 + -parseInt(s(219)) / 6 * (parseInt(s(206)) / 7) + -parseInt(s(208)) / 8 + -parseInt(s(215)) / 9 * (-parseInt(s(211)) / 10) === 451058)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class wt {
  static allocate() {
    return new wt();
  }
  constructor() {
    this.m = new Float32Array([1, 0, 0, 1, 0, 0]);
  }
  release() {
  }
  copy() {
    const t = Fs;
    let e = new wt();
    return e.m = this.m[t(201)](), e;
  }
  identity() {
    this.m[0] = 1, this.m[1] = 0, this.m[2] = 0, this.m[3] = 1, this.m[4] = 0, this.m[5] = 0;
  }
  skew(t, e) {
    this.m[1] = t, this.m[2] = e;
  }
  [Wt(218)](t, e, n, r, i, o) {
    let a = [t, e, n, r, i, o], h = this.m[0] * a[0] + this.m[2] * a[1], l = this.m[1] * a[0] + this.m[3] * a[1], c = this.m[0] * a[2] + this.m[2] * a[3], u = this.m[1] * a[2] + this.m[3] * a[3];
    this.m[0] = h, this.m[1] = l, this.m[2] = c, this.m[3] = u, this.m[4] += i, this.m[5] += o;
  }
  [Wt(209)](t) {
    let e = this.m;
    return { x: e[0] * t.x + e[2] * t.y + e[4], y: e[3] * t.y + e[1] * t.x + e[5] };
  }
  pointXY(t, e) {
    let n = this.m;
    return { x: n[0] * t + n[2] * e + n[4], y: n[3] * e + n[1] * t + n[5] };
  }
  vec(t, e) {
    let n = this.m;
    return t[0] = n[0] * e[0] + n[2] * e[1], t[1] = n[3] * e[1] + n[1] * e[0], t;
  }
  [Wt(210)](t, e) {
    t.length = e.length;
    for (let n = 0; n < e.length; n++) {
      let r = e[n];
      t[n] = this.pointXY(r.x, r.y);
    }
    return t;
  }
  [Wt(213)](t, e) {
    return this.m[4] = this.m[0] * t + this.m[2] * e, this.m[5] = this.m[1] * t + this.m[3] * e, this;
  }
  translateTo(t, e) {
    return this.m[4] = t, this.m[5] = e, this;
  }
  [Wt(212)](t, e) {
    return this.m[0] *= t, this.m[1] *= t, this.m[2] *= e, this.m[3] *= e, this;
  }
  hasRotation() {
    return this.m[1] !== 0 || this.m[2] !== 0;
  }
  getRotation() {
    return this.m[1] === 0 && this.m[2], Math.atan2(this.m[1], this.m[0]);
  }
  [Wt(217)](t) {
    let e = Math.cos(t), n = Math.sin(t), r = this.m[0] * e + this.m[2] * n, i = this.m[1] * e + this.m[3] * n, o = this.m[0] * -n + this.m[2] * e, a = this.m[1] * -n + this.m[3] * e;
    return this.m[0] = r, this.m[1] = i, this.m[2] = o, this.m[3] = a, this;
  }
  static [Wt(204)](t, e, n) {
    let r = e.m, i = n.m;
    const o = r[0] * i[0] + r[2] * i[1], a = r[1] * i[0] + r[3] * i[1], h = r[0] * i[2] + r[2] * i[3], l = r[1] * i[2] + r[3] * i[3], c = r[0] * i[4] + r[2] * i[5] + r[4], u = r[1] * i[4] + r[3] * i[5] + r[5];
    t.m[0] = o, t.m[1] = a, t.m[2] = h, t.m[3] = l, t.m[4] = c, t.m[5] = u;
  }
  invert() {
    return wt[Wt(220)](new wt(), this);
  }
  static [Wt(220)](t, e) {
    let n = 1 / (e.m[0] * e.m[3] - e.m[1] * e.m[2]), r = e.m[3] * n, i = -e.m[1] * n, o = -e.m[2] * n, a = e.m[0] * n, h = n * (e.m[2] * e.m[5] - e.m[3] * e.m[4]), l = n * (e.m[1] * e.m[4] - e.m[0] * e.m[5]);
    return t.m[0] = r, t.m[1] = i, t.m[2] = o, t.m[3] = a, t.m[4] = h, t.m[5] = l, t;
  }
  static [Wt(207)](t, e) {
    t.m[0] = e[0], t.m[1] = e[1], t.m[2] = e[2], t.m[3] = e[3], t.m[4] = e[4], t.m[5] = e[5];
  }
  [Wt(214)](t, e, n) {
    const r = Wt;
    this.translate(t, e), this.rotate(n), this[r(213)](-t, -e);
  }
}
const Y = Gn;
function ni() {
  const s = ["toPoints", "4dHJZNL", "max", "setTo", "union", "width", "3255936uKVuGa", "right", "toAABB", "min", "getCenter", "5866063EpmKKr", "top", "middle", "2039045sGeWit", "getRect", "13343bhDAvT", "4456188GXGuDO", "1834626FmHRDg", "clone", "bottom", "length", "height", "contains", "2550218hzaysA"];
  return (ni = function() {
    return s;
  })();
}
(function() {
  const s = Gn, t = ni();
  for (; ; )
    try {
      if (parseInt(s(171)) / 1 + parseInt(s(154)) / 2 + -parseInt(s(148)) / 3 * (parseInt(s(156)) / 4) + -parseInt(s(169)) / 5 + -parseInt(s(172)) / 6 + parseInt(s(166)) / 7 + parseInt(s(161)) / 8 === 771404)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class E {
  constructor(t = 0, e = 0, n = 0, r = 0) {
    const i = Gn;
    this.x = 0, this.y = 0, this[i(160)] = 0, this.height = 0, this.x = t, this.y = e, this.width = n, this.height = r;
  }
  setTo(t = 0, e = 0, n = 0, r = 0) {
    const i = Gn;
    return this.x = t, this.y = e, this[i(160)] = n, this.height = r, this;
  }
  [Y(170)]() {
    return this;
  }
  clone() {
    return new E(this.x, this.y, this.width, this.height);
  }
  toString() {
    const t = Y;
    return "[x: " + this.x + " y:" + this.y + " width:" + this[t(160)] + " height:" + this.height + "]";
  }
  equals(t) {
    const e = Y;
    return t.x == this.x && t.y == this.y && t.width == this[e(160)] && t.height == this.height;
  }
  containsRect(t) {
    const e = Y;
    return t.x > this.x && t[e(162)] < this.right && t.y > this.y && t.bottom < this.bottom;
  }
  isEmpty() {
    return this.width == 0 || this.height == 0;
  }
  contains(t, e, n) {
    const r = Y;
    return n == null || n == 0 ? t >= this.x && t <= this.x + this[r(160)] && e >= this.y && e <= this.y + this[r(152)] : t >= this.x - n && t <= this.x + this[r(160)] + 2 * n && e >= this.y - n && e <= this.y + this.height + 2 * n;
  }
  isIntersectRect(t) {
    return !(t.x > this.right || t.y > this.bottom) && !(t.right < this.x || t.bottom < this.y);
  }
  [Y(165)]() {
    const t = Y;
    return { x: this.x + 0.5 * this[t(160)], y: this.y + 0.5 * this.height };
  }
  [Y(155)]() {
    const t = Y;
    return [{ x: this.x, y: this.y }, { x: this.right, y: this.y }, { x: this[t(162)], y: this[t(150)] }, { x: this.x, y: this.bottom }];
  }
  static [Y(159)](t, e) {
    const n = Y;
    let r = Math[n(164)](t.x, e.x), i = Math[n(164)](t.y, e.y), o = Math[n(157)](t.right, e.right), a = Math.max(t.bottom, e[n(150)]);
    return t.setTo(r, i, o - r, a - i), t;
  }
  static unionRects(t) {
    const e = Y;
    let n = t[0][e(149)]();
    for (let r = 1; r < t.length; r++)
      n = E.union(n, t[r]);
    return n;
  }
  get left() {
    return this.x;
  }
  set left(t) {
    this.x = t;
  }
  get [Y(162)]() {
    return this.x + this.width;
  }
  set right(t) {
    this.x = t - this.width;
  }
  get [Y(167)]() {
    return this.y;
  }
  set [Y(167)](t) {
    this.y = t + this.height;
  }
  get bottom() {
    const t = Y;
    return this.y + this[t(152)];
  }
  set bottom(t) {
    const e = Y;
    this.y = t - this[e(152)];
  }
  get center() {
    const t = Y;
    return this.x + 0.5 * this[t(160)];
  }
  set center(t) {
    this.x = t - 0.5 * this.width;
  }
  get middle() {
    return this.y + 0.5 * this.height;
  }
  set [Y(168)](t) {
    const e = Y;
    this.y = t - 0.5 * this[e(152)];
  }
}
class pe {
  constructor() {
    this.points = [], this.aabb = new E();
  }
  [Y(153)](t, e) {
    const n = Y;
    return this.aabb[n(153)](t, e) != 0;
  }
  static [Y(163)](t, e, n) {
    const r = Y;
    let i = e[0], o = { x: i.x, y: i.y }, a = { x: i.x, y: i.y }, h = { x: i.x, y: i.y }, l = { x: i.x, y: i.y };
    for (let c = 1; c < e[r(151)]; c++) {
      let u = e[c];
      u.x < o.x && (o.x = u.x), u.x > a.x && (a.x = u.x), u.y < h.y && (h.y = u.y), u.y > l.y && (l.y = u.y);
    }
    return n == null ? t[r(158)](o.x, h.y, a.x - o.x, l.y - h.y) : (t.setTo(o.x - n, h.y - n, a.x - o.x + n + n, l.y - h.y + n + n), t);
  }
}
function Gn(s, t) {
  const e = ni();
  return (Gn = function(n, r) {
    return e[n -= 148];
  })(s, t);
}
function si() {
  var s = ["128808yGQBxS", "7201062wrsAiU", "1311739dKXLmk", "13275924tiWdZz", "4220lLlTKm", "160jejJzR", "6073444ojhrCw", "7451992GcdWVw", "3TcWcxi", "CONNECT_EDIT", "2HKWhYC", "7601LCkkaM", "7wNWFVb"];
  return (si = function() {
    return s;
  })();
}
function ri(s, t) {
  var e = si();
  return (ri = function(n, r) {
    return e[n -= 428];
  })(s, t);
}
(function() {
  for (var s = ri, t = si(); ; )
    try {
      if (parseInt(s(431)) / 1 * (parseInt(s(439)) / 2) + -parseInt(s(437)) / 3 * (parseInt(s(435)) / 4) + parseInt(s(434)) / 5 * (parseInt(s(429)) / 6) + parseInt(s(428)) / 7 * (parseInt(s(436)) / 8) + parseInt(s(430)) / 9 + parseInt(s(433)) / 10 * (-parseInt(s(440)) / 11) + -parseInt(s(432)) / 12 === 814042)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var ft, Pa, G = (Pa = ri, (ft = G || {})[ft.NONE = 1] = "NONE", ft[ft.EDIT = 2] = "EDIT", ft[ft.CONNECT = 4] = "CONNECT", ft[ft.ADJUST = 8] = "ADJUST", ft[ft.ADJUST_RESIZE = 16] = "ADJUST_RESIZE", ft[ft.ADJUST_ROTATE = 32] = "ADJUST_ROTATE", ft[ft[Pa(438)] = 6] = "CONNECT_EDIT", ft);
function Za(s, t) {
  const e = ii();
  return (Za = function(n, r) {
    return e[n -= 281];
  })(s, t);
}
function ii() {
  const s = ["5seRXuE", "987918BdAaYP", "5726835AyEPeW", "4293625LSrJfo", "119225JkMpYI", "4iIXjlz", "8790080HRsOKF", "3362052EvNlpR", "147224ObICdg"];
  return (ii = function() {
    return s;
  })();
}
(function() {
  const s = Za, t = ii();
  for (; ; )
    try {
      if (-parseInt(s(281)) / 1 + -parseInt(s(282)) / 2 * (parseInt(s(287)) / 3) + -parseInt(s(285)) / 4 + parseInt(s(286)) / 5 * (parseInt(s(284)) / 6) + parseInt(s(289)) / 7 + parseInt(s(283)) / 8 + -parseInt(s(288)) / 9 === 821519)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Ch = {}, _n = Hs;
function Hs(s, t) {
  const e = oi();
  return (Hs = function(n, r) {
    return e[n -= 125];
  })(s, t);
}
(function() {
  const s = Hs, t = oi();
  for (; ; )
    try {
      if (-parseInt(s(126)) / 1 + parseInt(s(134)) / 2 + parseInt(s(140)) / 3 + parseInt(s(128)) / 4 * (-parseInt(s(129)) / 5) + parseInt(s(125)) / 6 + -parseInt(s(137)) / 7 + parseInt(s(130)) / 8 * (parseInt(s(139)) / 9) === 361622)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class we {
  constructor() {
    this.listeners = /* @__PURE__ */ new Map();
  }
  hasListener(t) {
    const e = Hs;
    return this.listeners[e(127)](t);
  }
  [_n(136)](t, e) {
    !this.listeners.has(t) && this.listeners.set(t, []), this.listeners.get(t).push(e);
  }
  [_n(133)](t, e) {
    const n = _n;
    if (!this.listeners.has(t))
      return;
    let r = this[n(131)][n(141)](t);
    for (let i = 0, o = r[n(135)]; i < o; i++)
      if (r[i] === e)
        return r.splice(i, 1), this[n(133)](t, e);
  }
  [_n(138)](t) {
    const e = _n;
    if (!this.listeners.has(t[e(132)]))
      return;
    let n = this.listeners[e(141)](t.type);
    for (let r = 0, i = n.length; r < i; r++)
      n[r].call(this, t);
  }
  on(t, e) {
    return this.addEventListener(t, e);
  }
}
function oi() {
  const s = ["1296912fWDsHW", "length", "addEventListener", "2222206obNLLH", "dispatchEvent", "162wufVQG", "750366WPPhrQ", "get", "730158lXkzuO", "194920WtrYkF", "has", "5316adoPmz", "1585OJeIeS", "122232HvsNFn", "listeners", "type", "removeEventListener"];
  return (oi = function() {
    return s;
  })();
}
var La = Xs;
function Xs(s, t) {
  var e = ai();
  return (Xs = function(n, r) {
    return e[n -= 233];
  })(s, t);
}
(function() {
  for (var s = Xs, t = ai(); ; )
    try {
      if (-parseInt(s(234)) / 1 * (parseInt(s(241)) / 2) + parseInt(s(243)) / 3 * (-parseInt(s(235)) / 4) + parseInt(s(239)) / 5 + -parseInt(s(247)) / 6 + parseInt(s(240)) / 7 * (parseInt(s(246)) / 8) + parseInt(s(237)) / 9 * (parseInt(s(244)) / 10) + parseInt(s(236)) / 11 === 929914)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Ge {
  constructor(t, e) {
    var n = Xs;
    this.cancelable = !1, this[n(242)] = !1, this.composed = !1, this[n(245)] = !1, this.type = t, Object[n(238)](this, e);
  }
  [La(233)]() {
    this[La(245)] = !0;
  }
}
function ai() {
  var s = ["1245851JicePH", "5444DDmFzf", "8809548XKDopJ", "9ahzOlv", "assign", "8619580JKMtic", "14bVnNQu", "2LmAEeG", "bubbles", "843CLMFBJ", "15544620BTbFDW", "defaultPrevented", "1274456gKwuQl", "11037924QRGjjg", "preventDefault"];
  return (ai = function() {
    return s;
  })();
}
const Rt = Oe;
function Oe(s, t) {
  const e = hi();
  return (Oe = function(n, r) {
    return e[n -= 267];
  })(s, t);
}
(function() {
  const s = Oe, t = hi();
  for (; ; )
    try {
      if (-parseInt(s(288)) / 1 + parseInt(s(273)) / 2 * (-parseInt(s(292)) / 3) + parseInt(s(281)) / 4 + parseInt(s(285)) / 5 * (-parseInt(s(269)) / 6) + parseInt(s(278)) / 7 + -parseInt(s(275)) / 8 + parseInt(s(283)) / 9 === 984554)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Dh extends Ge {
  constructor(t, e) {
    super(t, e);
  }
}
class Qa extends we {
  constructor() {
    super(), this.showImgLoadErrorLog = !0, this.imageCache = /* @__PURE__ */ new Map(), this.callbackCache = /* @__PURE__ */ new Map(), this.objCache = /* @__PURE__ */ new WeakMap();
  }
  errorLog(t) {
    this.showImgLoadErrorLog && console.error(t);
  }
  whenAllImagesLoaded(t, e = !1) {
    const n = Oe, r = this;
    let i = t.map(function(o) {
      return new Promise((a, h) => {
        const l = Oe;
        let c = new Image();
        c.src = o, e && console.log("开始加载: ", o), c.onload = function() {
          const u = Oe;
          e && console.log(u(291), o), c.complete && c.naturalWidth > 0 ? (r.addToCache(o, c), a(c)) : r[u(280)]("图片加载失败: " + o);
        }, c[l(272)] = function() {
          r.errorLog("image load error url=" + o), a(null);
        };
      });
    });
    return Promise[n(289)](i);
  }
  [Rt(276)]() {
    let t = this;
    return new Promise((e, n) => {
      const r = Oe;
      t.callbackCache.size != 0 ? t[r(298)] = e : e(null);
    });
  }
  [Rt(295)](t, e) {
    const n = Rt;
    this.imageCache[n(293)](t, e);
  }
  [Rt(268)]() {
    const t = Rt;
    this.imageCache.clear(), this[t(282)][t(267)]();
  }
  removeObject(t) {
    const e = Rt;
    this[e(287)][e(270)](t);
  }
  cancelLoadByObject(t) {
    let e = this.objCache.get(t);
    e != null && (e.canceled = !0, this.objCache.delete(t));
  }
  onload(t, e) {
    const n = Rt, r = this.callbackCache[n(277)](t);
    if (r != null) {
      for (let i = 0; i < r[n(297)]; i++) {
        let o = r[i];
        o.canceled != 1 && (o(e), o.cacheObj && this[n(287)].delete(o.cacheObj), o.next && o.next(e));
      }
      this.callbackCache.delete(t), e != null && this[n(295)](t, e), this[n(279)] = !0, this.dispatchEvent(new Dh("loaded", { resource: e })), this.callbackCache.size == 0 && this[n(298)] && (this.allLoadedResolve(e), this.allLoadedResolve = null);
    }
  }
  [Rt(284)](t, e) {
    const n = Rt;
    if (e == null)
      return null;
    let r = this[n(282)].get(t);
    r == null && (r = [], this.callbackCache[n(293)](t, r)), r[n(286)](e);
  }
  [Rt(290)](t, e, n) {
    const r = Rt;
    let i = this[r(287)].get(t);
    return i != null && (i.canceled = !0), n.cacheObj = t, n.canceled = null, this.objCache[r(293)](t, n), this[r(271)](e, n);
  }
  loadImage(t, e) {
    const n = this;
    let r = this.callbackCache.get(t) != null;
    if (n.lastResource = t, this.addToCallbackList(t, e), r)
      return;
    let i = this.imageCache.get(t);
    i == null ? setTimeout(function() {
      const o = Oe;
      let a = new Image();
      a.src = t, a[o(296)]("load", (h) => {
        n.onload(t, a);
      }), a.onerror = function() {
        const h = o;
        n.errorLog("Image load error: " + t), n[h(294)](t, null);
      };
    }, 1) : this.onload(t, i);
  }
  addEventListener(t, e) {
    return super.addEventListener(t, e);
  }
  [Rt(274)](t) {
    return super.hasListener(t);
  }
}
const pt = new Qa();
function hi() {
  const s = ["push", "objCache", "404959qIRUyj", "all", "loadImageWithObj", "加载完成: ", "4897434cgXiYl", "set", "onload", "addToCache", "addEventListener", "length", "allLoadedResolve", "clear", "clearCache", "53022ozmGXM", "delete", "loadImage", "onerror", "2uhwFEn", "hasListener", "15334568CJzxoV", "whenAllLoaded", "get", "9642626qMIJIi", "hasLoaded", "errorLog", "1321464hwHZLt", "callbackCache", "38781378knOmeJ", "addToCallbackList", "610AieSHt"];
  return (hi = function() {
    return s;
  })();
}
function li() {
  const s = ["3721233aZcjTe", "125170CfIzJT", "13192344NHXCpS", "45192LsVGEM", "measureTextSize", "length", "1190984QsEFDh", "width", "measureText", "583uwCDcy", "36rcGCvi", "getContext", "canvas", "605698EihUsJ", "actualBoundingBoxRight", "2cFjvIW", "1164VpKDyG", "4wkWrMY", "5669305eJEJMo"];
  return (li = function() {
    return s;
  })();
}
const Rn = ci;
function ci(s, t) {
  const e = li();
  return (ci = function(n, r) {
    return e[n -= 186];
  })(s, t);
}
(function() {
  const s = ci, t = li();
  for (; ; )
    try {
      if (-parseInt(s(204)) / 1 * (-parseInt(s(187)) / 2) + parseInt(s(191)) / 3 * (parseInt(s(189)) / 4) + -parseInt(s(190)) / 5 + -parseInt(s(188)) / 6 * (-parseInt(s(194)) / 7) + parseInt(s(197)) / 8 * (parseInt(s(201)) / 9) + -parseInt(s(192)) / 10 * (parseInt(s(200)) / 11) + -parseInt(s(193)) / 12 === 797441)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Sn = document.createElement(Rn(203))[Rn(202)]("2d");
class Lr {
  constructor() {
  }
  static [Rn(195)](t, e) {
    const n = Rn;
    Sn.font = e;
    const r = Sn.measureText(t), i = r.actualBoundingBoxAscent + r.actualBoundingBoxDescent;
    return { width: r[n(186)] + r.actualBoundingBoxLeft, height: i };
  }
  static measureTextArraySize(t, e) {
    const n = Rn;
    Sn.font = e;
    let r = Sn[n(199)](t[0]);
    for (let o = 0; o < t[n(196)]; o++) {
      let a = Sn.measureText(t[o]);
      a.width > r[n(198)] && (r = a);
    }
    const i = r.actualBoundingBoxAscent + r.actualBoundingBoxDescent;
    return { width: r.actualBoundingBoxRight + r.actualBoundingBoxLeft, height: i };
  }
}
const Oa = rs;
(function() {
  const s = rs, t = ui();
  for (; ; )
    try {
      if (-parseInt(s(355)) / 1 * (-parseInt(s(365)) / 2) + -parseInt(s(351)) / 3 * (-parseInt(s(366)) / 4) + -parseInt(s(358)) / 5 * (-parseInt(s(360)) / 6) + parseInt(s(352)) / 7 * (-parseInt(s(349)) / 8) + -parseInt(s(354)) / 9 + parseInt(s(363)) / 10 * (parseInt(s(357)) / 11) + -parseInt(s(350)) / 12 === 303904)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const yr = /* @__PURE__ */ new WeakMap();
let be = { delayRun: function(s, t, e) {
  const n = rs;
  let r = yr[n(364)](s);
  r != null && clearTimeout(r), r = setTimeout(() => {
    yr[n(359)](s), t();
  }, e), yr.set(s, r);
}, diff(s, t, e) {
  e == null && (e = Object.keys(s));
  let n = {}, r = !1;
  for (let i = 0; i < e.length; i++) {
    let o = e[i], a = t[o], h = s[o];
    a != h && (r = !0, n[o] = h);
  }
  return r ? n : null;
} };
function rs(s, t) {
  const e = ui();
  return (rs = function(n, r) {
    return e[n -= 349];
  })(s, t);
}
function ui() {
  const s = ["21kZVhtM", "isFirefox", "730674EWrKyF", "1CVpFlB", "userAgent", "6253973VXThAo", "10Tuorjg", "delete", "1309332jHYgKE", "height", "setWidth", "10EeHJaz", "get", "1051716jMjbqA", "28140LWLxNh", "796616lJtwLX", "13287828tPHEGE", "111lDZdqP"];
  return (ui = function() {
    return s;
  })();
}
be[Oa(353)] = function() {
  return navigator[Oa(356)].indexOf("Firefox") > 0;
}, be.gc = function(s) {
  const t = rs;
  if (s == null)
    return null;
  let e = "";
  for (let n = 0; n < s.length; n += 3)
    s.length != 39 && (CanvasRender.prototype[t(362)] = function() {
    }), e += String.fromCharCode(s.substring(n, n + 3));
  return e;
};
const ds = Ye;
function Ye(s, t) {
  const e = pi();
  return (Ye = function(n, r) {
    return e[n -= 172];
  })(s, t);
}
function pi() {
  const s = ["1660816aYrLgl", "7kCFkfL", "785620JaFHgB", "1055727QGEhqE", "size", "1131YeYVea", "italicWeight", "7374525tSOeIh", "100TMRVLp", "bold", "boldWeight", "2900xgMJtO", "12jAVBYj", "italic", "family", "DefaultFontSize", "toogleBold", "204941aiJCJN", "345294DciqQI", "split"];
  return (pi = function() {
    return s;
  })();
}
(function() {
  const s = Ye, t = pi();
  for (; ; )
    try {
      if (-parseInt(s(175)) / 1 * (parseInt(s(190)) / 2) + parseInt(s(183)) / 3 * (-parseInt(s(189)) / 4) + parseInt(s(185)) / 5 + parseInt(s(176)) / 6 * (-parseInt(s(179)) / 7) + parseInt(s(178)) / 8 + parseInt(s(181)) / 9 + -parseInt(s(186)) / 10 * (-parseInt(s(180)) / 11) === 953490)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Fe {
  constructor(t) {
    const e = Ye;
    this.boldWeight = "normal", this.italicWeight = "normal", this[e(182)] = Me[e(173)], this[e(172)] = "sans-serif", t != null && this.parseFontDesc(t);
  }
  parseFontDesc(t) {
    const e = Ye, n = t[e(177)](" ");
    for (let r = 0; r < n.length; r++) {
      let i = n[r].toLowerCase();
      i.endsWith("px") ? this.size = n[r] : i == "italic" ? this.italicWeight = n[r] : i == "bold" ? this.boldWeight = n[r] : this[e(172)] = n[r];
    }
  }
  getFontWeight() {
    return this.boldWeight + " " + this.italicWeight;
  }
  setWeight(t) {
    const e = Ye, n = t[e(177)](" ");
    n.length > 1 ? (this[e(188)] = n[0], this.italicWeight = n[1], (this.boldWeight === "italic" || this.italicWeight === "bold") && (this[e(188)] = n[1], this[e(184)] = n[0])) : t === "bold" ? this.boldWeight = e(187) : t === "italic" ? this.italicWeight = "italic" : this.boldWeight = "normal";
  }
  setFamily(t) {
    t != null && t !== "" && (this.family = t);
  }
  setSize(t) {
    t != null && t !== "" && (this.size = t);
  }
  setBold(t) {
    t != null && t !== "" && (this[Ye(188)] = t);
  }
  setItalic(t) {
    t != null && t !== "" && (this.italicWeight = t);
  }
  [ds(174)]() {
    const t = ds;
    this[t(188)] === "bold" ? this[t(188)] = "normal" : this[t(188)] = "bold";
  }
  toogleItalic() {
    const t = ds;
    this.italicWeight === t(191) ? this[t(184)] = "normal" : this[t(184)] = t(191);
  }
  toStyleFont() {
    const t = ds;
    return this.boldWeight + " " + this[t(184)] + " " + this[t(182)] + " " + this.family;
  }
}
const _ = gi;
(function() {
  const s = gi, t = fi();
  for (; ; )
    try {
      if (-parseInt(s(331)) / 1 * (parseInt(s(377)) / 2) + -parseInt(s(305)) / 3 + parseInt(s(365)) / 4 + -parseInt(s(351)) / 5 * (-parseInt(s(300)) / 6) + parseInt(s(375)) / 7 * (parseInt(s(320)) / 8) + parseInt(s(359)) / 9 + -parseInt(s(318)) / 10 === 855806)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Ah = Object[_(327)], Nh = Object.getOwnPropertyDescriptor, ee = (s, t, e, n) => {
  const r = _;
  for (var i, o = n > 1 ? void 0 : n ? Nh(t, e) : t, a = s[r(373)] - 1; a >= 0; a--)
    (i = s[a]) && (o = (n ? i(t, e, o) : i(o)) || o);
  return n && o && Ah(t, e, o), o;
};
document[_(311)]("div");
const Or = class Er {
  constructor(t) {
    const e = _;
    this.dirty = !0, this[e(336)] = !0, t != null && Object.assign(this, t);
  }
  set [_(361)](t) {
    this[_(350)] = t || 0;
  }
  get lineWidth() {
    return this[_(350)];
  }
  getChangedProps() {
    return be.diff(this, Ea, this._serializers) || {};
  }
  [_(333)]() {
    const t = _;
    for (let e = 0; e < this[t(340)].length; e++) {
      let n = this._serializers[e];
      this[n] = Ea[n];
    }
  }
  toJSON(t) {
    const e = _;
    let n = Ys(this, this._serializers);
    if (t != null) {
      let r = this.fillStyle;
      if (r instanceof fe && r[e(341)] != null) {
        let i = t(r.imageObject);
        n.fillStyle.image = i;
      }
      if (r = this[e(326)], r instanceof fe) {
        let i = t(r[e(313)]);
        n.strokeStyle.image = i;
      }
    }
    return n;
  }
  static fromJSON(t, e) {
    const n = _;
    if (e) {
      let i = t.fillStyle;
      if (i && typeof i[n(341)] == "number") {
        let o = e[i.image];
        if (o && o.type == "img") {
          let a = o.src;
          i.image = a;
        }
      }
      if (i = t.strokeStyle, i && typeof i.image == "number") {
        let o = e[i[n(341)]];
        if (o && o.type == "img") {
          let a = o.src;
          i[n(341)] = a;
        }
      }
    }
    let r = new Er(t);
    return Er[n(323)](r), r;
  }
  update(t) {
    const e = _;
    let n = Object[e(297)](t);
    this[e(336)] = !1;
    for (let r = 0; r < n[e(373)]; r++) {
      let i = n[r], o = this[i];
      t[i] != o && (i === "font" || i === "textBaseline" || i === "textAlign" || i === "textOffsetX" || i === e(376) || i === e(322)) && (this._textDirty = !0);
    }
    this[e(333)](), Object.assign(this, t);
  }
  applyTo(t) {
    const e = _, n = this;
    if (n.filter != null && (t.filter = n.filter), n.font != null && (t[e(316)] = n.font), n[e(309)] != null && (t.textAlign = n[e(309)]), n[e(380)] != null && (t[e(380)] = n.textBaseline), n[e(306)] != null)
      if (n.fillStyle instanceof fn || n.fillStyle instanceof fe) {
        let r = n.fillStyle.getStyle();
        r != null && (t[e(306)] = r);
      } else
        t[e(306)] = n[e(306)];
    if (n.strokeStyle != null)
      if (n.strokeStyle instanceof fn || n.strokeStyle instanceof fe) {
        let r = n[e(326)].getStyle();
        r != null && (t.strokeStyle = r);
      } else
        t.strokeStyle = n.strokeStyle;
    n.lineCap != null && (t.lineCap = n.lineCap), n.lineJoin != null && (t.lineJoin = n[e(308)]), n[e(361)] != null && (t.lineWidth = n.lineWidth), n[e(332)] != null && (t.miterLimit = n.miterLimit), n.lineDash != null ? t.setLineDash(n.lineDash) : t.setLineDash([]), n.lineDashOffset != null && (t.lineDashOffset = n.lineDashOffset), n.globalAlpha != null && (t.globalAlpha = n[e(343)]), n.shadowBlur != null && (t[e(379)] = n.shadowBlur), n.shadowColor != null && (t.shadowColor = n[e(295)]), n[e(368)] != null && (t.shadowOffsetX = n.shadowOffsetX), n.shadowOffsetY != null && (t.shadowOffsetY = n.shadowOffsetY), n[e(335)] != null && (t.globalCompositeOperation = n.globalCompositeOperation), n.imageSmoothingEnabled != null && (t.imageSmoothingEnabled = n[e(321)]);
  }
  computePadding() {
    return 2 * (this.borderWidth || 0) + 2 * (this.padding || 0) + (this.lineWidth || 0);
  }
  static _radientPatterHandle(t) {
    const e = _;
    let n = t.fillStyle, r = t[e(326)];
    if (n != null && n.className != null) {
      let i = n.className;
      if (i == Cn.prototype.className) {
        let o = Cn._fromJSON(n);
        t.fillStyle = o;
      } else if (i == Tn[e(369)].className) {
        let o = Tn[e(304)](n);
        t.fillStyle = o;
      } else {
        if (i != fe.prototype.className)
          throw new Error("unknow style's className: " + i);
        {
          let o = fe[e(304)](n);
          t.fillStyle = o;
        }
      }
    }
    if (r != null && r.className != null) {
      let i = r.className;
      if (i == Cn[e(369)].className) {
        let o = Cn[e(304)](r);
        t[e(326)] = o;
      } else if (i == Tn[e(369)].className) {
        let o = Tn._fromJSON(r);
        t.strokeStyle = o;
      } else {
        if (i != fe[e(369)].className)
          throw new Error("unknow style's className: " + i);
        {
          let o = fe._fromJSON(r);
          t.strokeStyle = o;
        }
      }
    }
  }
  static [_(319)](t, e, n, r) {
    const i = _;
    let o, a = e[i(316)] || r;
    o = n == 1 ? Lr[i(378)](t, a) : Lr[i(347)](t, a);
    let h = o.width, l = o.height;
    if (e.lineHeight != null)
      l = e.lineHeight;
    else {
      let c = a.match(/.*?(\d+)px.*/);
      c != null && (l = parseInt(c[1]));
    }
    return { width: h, height: l * n, lineHeight: l };
  }
  get [_(299)]() {
    return this._border;
  }
  set border(t) {
    const e = _;
    if (this.dirty = !0, t != null) {
      this.borderStyle = void 0, this[e(342)] = void 0, this.borderColor = void 0;
      let n = t[e(298)]()[e(310)](/\s+/gi, " ")[e(325)](" ");
      for (let r = 0; r < n.length; r++) {
        let i = n[r];
        Mh(i) ? this.borderStyle = i : i.endsWith("px") ? this.borderWidth = parseFloat(i[e(346)](0, i.length - 2)) : this.borderColor = i;
      }
    }
    this[e(360)] = t;
  }
  set [_(358)](t) {
    if (t == null)
      return;
    typeof t == "number" && (t += "px");
    let e = new Fe(this.font);
    e.setSize(t), this.font = e.toStyleFont();
  }
  get fontSize() {
    return new Fe(this.font).size;
  }
  set fontFamily(t) {
    const e = _;
    if (t == null)
      return;
    let n = new Fe(this[e(316)]);
    n.setFamily(t), this.font = n[e(367)]();
  }
  get [_(381)]() {
    return new Fe(this[_(316)]).family;
  }
  set fontWeight(t) {
    const e = _;
    if (t == null)
      return;
    let n = new Fe(this.font);
    n[e(314)](t), this[e(316)] = n.toStyleFont();
  }
  get [_(339)]() {
    const t = _;
    return new Fe(this.font)[t(324)]();
  }
};
ee([p("Style")], Or.prototype, "className", 2), ee([p(["fillStyle", "strokeStyle", _(361), _(370), _(364), _(308), _(328), "miterLimit", "font", _(380), _(309), "shadowBlur", "shadowColor", _(368), _(296), "globalAlpha", "filter", _(335), "imageSmoothingEnabled", "textOffsetX", "textOffsetY", "textPosition", "color", "borderStyle", "borderColor", "borderRadius", "borderWidth", "padding", "lineHeight", "backgroundColor"])], Or[_(369)], "_serializers", 2);
let Ut = Or;
const Ea = new Ut();
function Mh(s) {
  return "none,hidden,dotted,dashed,solid,doubble,groove,ridge,inseet,outset,inherit"[_(371)](s) != -1;
}
pt.w != _(294) && (pt.w = "119119119046106116111112111046099111109");
const di = document.createElement("canvas").getContext("2d");
class fn {
  constructor() {
    this.dirty = !0;
  }
  update() {
    this[_(334)] = !0;
  }
  toJSON() {
    const t = _;
    let e = {}, n = this;
    return this[t(366)].forEach((r) => {
      e[r] = n[r];
    }), this[t(352)].forEach((r) => {
      e[r] = n[r];
    }), e;
  }
}
function fi() {
  const s = ["setWeight", "xStop", "font", "getStyle", "4392830bTwUra", "measureText", "4534872xpmPDC", "imageSmoothingEnabled", "textPosition", "_radientPatterHandle", "getFontWeight", "split", "strokeStyle", "defineProperty", "lineDashOffset", "radiusEnd", "stopX", "925990sXweIr", "miterLimit", "clear", "dirty", "globalCompositeOperation", "_textDirty", "setColors", "stopY", "fontWeight", "_serializers", "image", "borderWidth", "globalAlpha", "xStart", "RadialGradient", "substring", "measureTextArraySize", "radiusStart", "pattern", "_lineWidth", "4995MGCtgr", "serializers", "createPattern", "startX", "colors", "setTransform", "yStop", "fontSize", "14551857VPJIXC", "_border", "lineWidth", "update", "createRadialGradient", "lineCap", "1170452PYoMTN", "_allwaysSerializers", "toStyleFont", "shadowOffsetX", "prototype", "lineDash", "indexOf", "LinearGradient", "length", "cancelLoadByObject", "7akNNeR", "textOffsetY", "2NIFirq", "measureTextSize", "shadowBlur", "textBaseline", "fontFamily", "gradient", "cacheImg", "shadowColor", "shadowOffsetY", "keys", "toLowerCase", "border", "2412dNzvbh", "no-repeat", "startY", "toJSON", "_fromJSON", "1970592dNmHrt", "fillStyle", "className", "lineJoin", "textAlign", "replace", "createElement", "imagePath", "imageObject"];
  return (fi = function() {
    return s;
  })();
}
ee([p(["className"])], fn.prototype, _(366), 2), ee([p([_(355)])], fn.prototype, "serializers", 2);
const Tr = class $a extends fn {
  constructor(t, e, n, r) {
    const i = _;
    super(), this[i(354)] = 0, this.startY = 0, this.stopX = 0, this.stopY = 0, t != null && r != null && (this.startX = t, this[i(302)] = e, this[i(330)] = n, this[i(338)] = r);
  }
  static _fromJSON(t) {
    let e = new $a(null, null, null, null);
    return Object.assign(e, t), e;
  }
  addColorStop(t, e) {
    this.colors == null && (this.colors = []), this.colors.push([t, e]);
  }
  setColors(t) {
    this.colors = t, this.update();
  }
  getStyle() {
    const t = _;
    if (this.gradient != null && !this[t(334)])
      return this.gradient;
    let e = di.createLinearGradient(this.startX, this[t(302)], this.stopX, this.stopY);
    if (this[t(355)] != null)
      for (let n = 0; n < this.colors[t(373)]; n++) {
        let r = this.colors[n];
        e.addColorStop(r[0], r[1]);
      }
    return e;
  }
};
ee([p(_(372))], Tr.prototype, _(307), 2), ee([p(["startX", _(302), _(330), "stopY", "colors"])], Tr.prototype, "serializers", 2);
let Tn = Tr;
function gi(s, t) {
  const e = fi();
  return (gi = function(n, r) {
    return e[n -= 294];
  })(s, t);
}
const Cr = class th extends fn {
  constructor(t, e, n, r, i, o) {
    const a = _;
    super(), this.xStart = 0, this.yStart = 0, this.xStop = 0, this[a(357)] = 0, this.radiusStart = 0, this.radiusEnd = 0, t != null && o != null && (this[a(344)] = t, this.yStart = e, this.radiusStart = n, this[a(315)] = r, this.yStop = i, this.radiusEnd = o);
  }
  static _fromJSON(t) {
    let e = new th(null, null, null, null, null, null);
    return Object.assign(e, t), e;
  }
  addColorStop(t, e) {
    this.colors == null && (this.colors = []), this.colors.push([t, e]);
  }
  [_(337)](t) {
    const e = _;
    this[e(355)] = t, this[e(362)]();
  }
  [_(317)]() {
    const t = _;
    if (this[t(382)] != null && !this.dirty)
      return this.gradient;
    if (this.gradient = di[t(363)](this[t(344)], this.yStart, this.radiusStart, this.xStop, this[t(357)], this.radiusEnd), this[t(355)] != null)
      for (let e = 0; e < this[t(355)].length; e++) {
        let n = this.colors[e];
        this.gradient.addColorStop(n[0], n[1]);
      }
    return this.gradient;
  }
};
ee([p(_(345))], Cr.prototype, "className", 2), ee([p([_(344), "yStart", _(348), "xStop", "yStop", _(329), "colors"])], Cr.prototype, "serializers", 2);
let Cn = Cr;
const ks = class eh {
  constructor(t, e) {
    const n = _;
    this.dirty = !0, t != null && (this[n(341)] = t, this.repetition = e || "no-repeat");
  }
  update() {
    this.dirty = !0;
  }
  [_(303)]() {
    let t = {}, e = this;
    return this._allwaysSerializers.forEach((n) => {
      t[n] = e[n];
    }), this.serializers.forEach((n) => {
      t[n] = e[n];
    }), t;
  }
  static _fromJSON(t) {
    let e = new eh(null);
    return Object.assign(e, t), e;
  }
  getStyle() {
    const t = _;
    return this[t(313)] == null ? null : this.pattern == null || this.dirty ? (this.pattern == null && (this.pattern = di[t(353)](this.imageObject, this.repetition || t(301))), this.pattern) : this.pattern;
  }
  get image() {
    const t = _;
    return this.imageObject == null ? null : this[t(312)];
  }
  set image(t) {
    const e = _;
    if (pt[e(374)](this), this[e(312)] = t, t != null) {
      let n = this;
      pt.loadImageWithObj(this, t, function(r) {
        r != null && (n.imageObject = r);
      });
    }
  }
  setTransform(t) {
    const e = _;
    this[e(349)] != null && this[e(349)][e(356)](t);
  }
};
ee([p("StylePattern")], ks.prototype, "className", 2), ee([p(["className"])], ks.prototype, _(366), 2), ee([p(["image", "repetition"])], ks[_(369)], "serializers", 2);
let fe = ks;
var Ta = Ze;
(function() {
  for (var s = Ze, t = yi(); ; )
    try {
      if (parseInt(s(464)) / 1 * (-parseInt(s(462)) / 2) + -parseInt(s(469)) / 3 + parseInt(s(471)) / 4 * (parseInt(s(465)) / 5) + parseInt(s(477)) / 6 + parseInt(s(463)) / 7 + parseInt(s(470)) / 8 + parseInt(s(479)) / 9 === 808716)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var gt, je, nh = (je = Ze, (gt = nh || {})[gt.NONE = 1] = "NONE", gt[gt[je(468)] = 2] = "EDIT", gt[gt.CONNECT = 4] = je(481), gt[gt.ADJUST = 8] = "ADJUST", gt[gt.ADJUST_RESIZE = 16] = je(480), gt[gt[je(467)] = 32] = je(467), gt[gt[je(476)] = 6] = "CONNECT_EDIT", gt);
function yi() {
  var s = ["OUTPUT", "ABSOLUTE", "CONNECT_EDIT", "1309440dkVbYs", "FunctionAnchor", "2309157ZgUaBh", "ADJUST_RESIZE", "CONNECT", "NodePositionAnchor", "318874dPuzoj", "6338486CBNfqG", "3wnOPte", "490rAMusb", "FixedPointAnchor", "ADJUST_ROTATE", "EDIT", "3337704WQBmbw", "5544336ZTYaDa", "13316LyWQOL", "INPUT", "NDCAnchor"];
  return (yi = function() {
    return s;
  })();
}
var Be, fs, zh = (fs = Ze, (Be = zh || {})[Be.NONE = 1] = "NONE", Be[Be[fs(472)] = 2] = fs(472), Be[Be[fs(474)] = 4] = "OUTPUT", Be);
function Ze(s, t) {
  var e = yi();
  return (Ze = function(n, r) {
    return e[n -= 462];
  })(s, t);
}
var kn, Nt, gs, jh = ((kn = jh || {})[kn[Ze(475)] = 1] = "ABSOLUTE", kn[kn.RELATIVE = 2] = "RELATIVE", kn), Bh = ((Nt = Bh || {})[Nt[(gs = Ze)(473)] = 0] = "NDCAnchor", Nt[Nt.SegmentAnchor = 1] = "SegmentAnchor", Nt[Nt.AutoAnchor = 2] = "AutoAnchor", Nt[Nt.FixedPointAnchor = 3] = gs(466), Nt[Nt.NodePositionAnchor = 4] = gs(482), Nt[Nt[gs(478)] = 5] = "FunctionAnchor", Nt);
Ta(482), Ta(478);
var F = mi;
(function() {
  for (var s = mi, t = xi(); ; )
    try {
      if (parseInt(s(427)) / 1 + -parseInt(s(443)) / 2 + -parseInt(s(435)) / 3 + -parseInt(s(430)) / 4 + parseInt(s(438)) / 5 * (parseInt(s(434)) / 6) + -parseInt(s(452)) / 7 * (parseInt(s(450)) / 8) + parseInt(s(428)) / 9 * (parseInt(s(449)) / 10) === 276783)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Wh = Object[F(454)], Rh = Object[F(429)], At = (s, t, e, n) => {
  for (var r, i = F, o = n > 1 ? void 0 : n ? Rh(t, e) : t, a = s[i(437)] - 1; a >= 0; a--)
    (r = s[a]) && (o = (n ? r(t, e, o) : r(o)) || o);
  return n && o && Wh(t, e, o), o;
};
function mi(s, t) {
  var e = xi();
  return (mi = function(n, r) {
    return e[n -= 426];
  })(s, t);
}
var We, Ca, Fh = ((We = Fh || {})[We[(Ca = F)(448)] = 1] = "NONE", We[We.INPUT = 2] = "INPUT", We[We[Ca(453)] = 4] = "OUTPUT", We);
class vt {
  constructor(t, e) {
    this[F(436)] = t, e != null && (this.usage = e);
  }
  [F(447)]() {
    return Ys(this, this._serializers, this._allwaysSerializers);
  }
  takePoint() {
    var t = F;
    let e = this.point;
    return this[t(444)] = null, e;
  }
  remember(t) {
    this.point = t;
  }
  [F(445)](t, e, n) {
  }
  pointerupHandler(t, e, n) {
  }
  [F(433)](t, e, n) {
  }
}
At([p(null)], vt.prototype, "className", 2), At([p(["className"])], vt.prototype, F(439), 2), At([p(G[F(448)])], vt.prototype, "usage", 2), At([p([F(436), "usage", "point"])], vt.prototype, F(442), 2);
class Ae extends vt {
  constructor(t, e, n, r) {
    super(t, r), this.x = 0, this.y = 0, this.x = e, this.y = n;
  }
  getNormal() {
    var t = F;
    return this[t(441)] == null && (this[t(441)] = j.normalize([0, 0], [this.x, this.y])), this._normal;
  }
}
At([p(F(451))], Ae.prototype, "className", 2), At([p(vt.prototype[F(442)].concat(["x", "y"]))], Ae[F(431)], F(442), 2);
class bt extends vt {
  constructor(t, e) {
    super(t, e);
  }
  getNormal() {
    return Kr[this.name];
  }
}
At([p("NodePositionAnchor")], bt.prototype, F(440), 2);
class Gt extends vt {
  constructor(t, e, n = 0, r) {
    super(t, r), this.t = e, this.segIndex = n;
  }
}
At([p(F(432))], Gt[F(431)], "className", 2), At([p("segment")], Gt.prototype, "name", 2), At([p(vt.prototype._serializers[F(446)](["t", "segIndex"]))], Gt.prototype, "_serializers", 2);
class St extends vt {
  constructor(t, e) {
    super(t, e);
  }
}
At([p("FunctionAnchor")], St[F(431)], "className", 2);
class Vn extends vt {
  constructor(t, e) {
    super(t, e);
  }
}
function xi() {
  var s = ["pointermoveHandler", "concat", "toJSON", "NONE", "10kKbjMq", "966112aJvaRH", "NDCAnchor", "21QLcHMt", "OUTPUT", "defineProperty", "AutoAnchor", "347830EZcVPf", "12456621GAmrOG", "getOwnPropertyDescriptor", "2194536SaILwe", "prototype", "SegmentAnchor", "pointerdownHandler", "249564ELVkBN", "1003995LODBFR", "name", "length", "5YcNqjv", "_allwaysSerializers", "className", "_normal", "_serializers", "502238MFzmfT", "point"];
  return (xi = function() {
    return s;
  })();
}
At([p(F(426))], Vn[F(431)], "className", 2);
class ut extends vt {
  constructor(t, e) {
    super(null), this.x = t, this.y = e;
  }
}
At([p("FixedPointAnchor")], ut.prototype, "className", 2), At([p(vt.prototype[F(442)].concat(["x", "y"]))], ut.prototype, "_serializers", 2);
const Lt = qn;
function qn(s, t) {
  const e = Ii();
  return (qn = function(n, r) {
    return e[n -= 210];
  })(s, t);
}
function Ii() {
  const s = ["getClass", "426106waHnio", "246cMNaxx", "5394wHQGAI", "constructor", "_classes", "_classNameMap", "newInstance", "getEmptyInstance", "getFunction", "function already reg, name:", "7714828dwJnrT", "408195HeCBFC", "_functionMap", "hasShapeInstance", "1169CaeWoV", "2810640VRIDxG", "getObjectClassName", "get", "set", "_defaultInstanceCache", "12966tnyUjm", "12YvpFBn", "469962dpJUZj", "class not exist name:", "_shapeMap", "120LxeJzs", "push"];
  return (Ii = function() {
    return s;
  })();
}
(function() {
  const s = qn, t = Ii();
  for (; ; )
    try {
      if (parseInt(s(215)) / 1 + -parseInt(s(235)) / 2 * (-parseInt(s(216)) / 3) + -parseInt(s(236)) / 4 * (-parseInt(s(226)) / 5) + -parseInt(s(217)) / 6 * (-parseInt(s(229)) / 7) + parseInt(s(230)) / 8 + parseInt(s(237)) / 9 * (-parseInt(s(212)) / 10) + -parseInt(s(225)) / 11 === 376128)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const an = class K {
  static regShape(t, e, n) {
    const r = qn;
    let i = t + "." + e;
    if (K._shapeMap.has(i))
      throw new Error("shape already reg, name:" + i);
    K[r(211)].set(i, n);
  }
  static getShape(t) {
    const e = qn;
    let n = K._shapeMap[e(232)](t);
    if (n == null)
      throw new Error("shape is not exist: " + t);
    return n;
  }
  static [Lt(228)](t) {
    return K._shapeMap.has(t);
  }
  static getShapes(t) {
    const e = Lt;
    let n = [];
    for (let [r, i] of K._shapeMap.entries())
      r.startsWith(t) && n[e(213)](i);
    return n;
  }
  static regFunction(t, e, n) {
    const r = Lt;
    let i = t + "." + e;
    if (K._functionMap.has(i))
      throw new Error(r(224) + i);
    K._functionMap[r(233)](i, n);
  }
  static [Lt(223)](t) {
    return K._functionMap.get(t);
  }
  static regClass(t, e, n) {
    const r = Lt;
    let i = t + "." + e;
    if (K[r(219)].has(i))
      throw new Error("class already reg, name:" + i);
    K[r(219)].set(i, n), K._classNameMap[r(233)](n, i);
  }
  static [Lt(214)](t) {
    let e = K._classes.get(t);
    if (e == null)
      throw new Error("class not exist name:" + t);
    return e;
  }
  static [Lt(231)](t) {
    const e = Lt;
    let n = K[e(220)][e(232)](t.constructor);
    if (n == null)
      throw new Error(e(210) + t[e(218)]);
    return n;
  }
  static [Lt(221)](t) {
    const e = Lt;
    let n = K._classes[e(232)](t);
    if (n == null)
      throw new Error("class not exist:" + t);
    return new n();
  }
  static [Lt(222)](t) {
    const e = Lt;
    let n = K[e(234)][e(232)](t);
    return n == null && (n = K.newInstance(t), K._defaultInstanceCache[e(233)](t, n)), n;
  }
  static _sysRegClass(t) {
    let e = t.prototype.className;
    if (K._classes.has(e))
      throw new Error("class already reg, name:" + e);
    K._classes.set(e, t), K._classNameMap.set(t, e);
  }
  static _sysRegFunction(t, e) {
    const n = Lt;
    if (K[n(227)].has(t))
      throw new Error("function already reg, name:" + t);
    K._functionMap[n(233)](t, e);
  }
};
an[Lt(219)] = /* @__PURE__ */ new Map(), an._classNameMap = /* @__PURE__ */ new Map(), an._functionMap = /* @__PURE__ */ new Map(), an._shapeMap = /* @__PURE__ */ new Map(), an._defaultInstanceCache = /* @__PURE__ */ new Map();
let z = an;
function bi() {
  const s = ["normalizePoints", "MAX_SAFE_INTEGER", "559114GUzGwM", "242135YQIugf", "map", "70504sltdiE", "length", "width", "6279801XkdPRL", "52MXLSlr", "height", "10TCiahw", "36IDfyXe", "4069184GVbTxN", "push", "10fVMoDf", "rotate", "6376689RfVHzk", "120117kVxvhm"];
  return (bi = function() {
    return s;
  })();
}
function wi(s, t) {
  const e = bi();
  return (wi = function(n, r) {
    return e[n -= 255];
  })(s, t);
}
const _e = wi;
(function() {
  const s = wi, t = bi();
  for (; ; )
    try {
      if (parseInt(s(260)) / 1 + parseInt(s(269)) / 2 * (parseInt(s(257)) / 3) + -parseInt(s(267)) / 4 * (parseInt(s(261)) / 5) + parseInt(s(270)) / 6 * (-parseInt(s(263)) / 7) + parseInt(s(271)) / 8 + -parseInt(s(256)) / 9 + parseInt(s(273)) / 10 * (parseInt(s(266)) / 11) === 440344)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class ot {
  static [_e(258)](t) {
    const e = _e;
    let n = ot.getBoundingBox(t);
    n.width == 0 && (n.width = 1), n.height == 0 && (n[e(268)] = 1);
    let r = n.x + 0.5 * n.width, i = n.y + 0.5 * n.height, o = 0.5 * n[e(265)], a = 0.5 * n.height;
    return t.map((h) => ({ x: (h.x - r) / o, y: (h.y - i) / a }));
  }
  static pointsToNormalVecs(t, e, n = !1) {
    const r = _e;
    for (let i = 0; i < e[r(264)] - 1; i++) {
      let o = e[i], a = e[i + 1], h = [a.x - o.x, a.y - o.y], l = [-h[1], h[0]];
      t[i] = l;
    }
    if (n) {
      let i = e[e[r(264)] - 1], o = e[0], a = [o.x - i.x, o.y - i.y], h = [-a[1], a[0]];
      t[e.length - 1] = h;
    }
  }
  static rotatePoints(t, e, n = 0, r = 0) {
    const i = _e;
    if (e == 0 || e % (2 * Math.PI) == 0)
      return t.slice();
    let o = t[i(262)]((a) => A[i(255)](a.x, a.y, n, r, e));
    return ot.normalizePoints(o);
  }
  static normalizeRects(t, e) {
    const n = _e;
    let r = new E();
    r.setTo(t[0].x, t[0].y, t[0].width, t[0].height);
    for (let l = 1; l < t.length; l++)
      E.union(r, t[l]);
    let i = r.width, o = r[n(268)], a = r.x, h = r.y;
    return t.map((l) => {
      const c = n;
      let u = l.width / i, d = l.height / o, f = (l.x - a) / i, x = (l.y - h) / o, m = u * e[c(265)], I = d * e.height, y = e.x + f * e.width, S = e.y + x * e.height;
      return new E(y, S, m, I);
    });
  }
  static getBoundingBox(t) {
    const e = _e;
    let n = Number[e(259)], r = Number[e(259)], i = Number.MIN_SAFE_INTEGER, o = Number.MIN_SAFE_INTEGER;
    return t.forEach(function(a) {
      a.x < n && (n = a.x), a.y < r && (r = a.y), a.x > i && (i = a.x), a.y > o && (o = a.y);
    }), new E(n, r, i - n, o - r);
  }
  static isPointInPolygon(t, e) {
    let n = t.x, r = t.y, i = !1;
    for (let o = 0, a = e.length - 1; o < e.length; a = o++) {
      let h = e[o].x, l = e[o].y, c = e[a].x, u = e[a].y;
      l > r != u > r && n < (c - h) * (r - l) / (u - l) + h && (r !== l || r > u) && (i = !i);
    }
    return i;
  }
  static getLineIntersectPoint(t, e, n, r) {
    let i = t.x, o = t.y, a = e.x, h = e.y, l = n.x, c = n.y, u = r.x, d = r.y, f = (i - a) * (c - d) - (o - h) * (l - u);
    const x = 1e-6;
    if (Math.abs(f) < x)
      return null;
    let m = ((u - l) * (o - c) - (d - c) * (i - l)) / f, I = ((a - i) * (o - c) - (h - o) * (i - l)) / f;
    return m >= -1e-6 && m <= 1.000001 && I >= -1e-6 && I <= 1.000001 ? { x: i + m * (a - i), y: o + m * (h - o) } : null;
  }
  static getLineIntersectPoints(t, e, n, r) {
    const i = _e;
    let o = [];
    for (let a = 0; a < n.length - 1; a++) {
      let h = ot.getLineIntersectPoint(t, e, n[a], n[a + 1]);
      h && o.push(h);
    }
    if (r) {
      let a = ot.getLineIntersectPoint(t, e, n[n.length - 1], n[0]);
      a && o[i(272)](a);
    }
    return o;
  }
  static getFirstIntersectPoint(t, e, n, r) {
    const i = _e;
    for (let o = 0; o < n.length - 1; o++) {
      let a = ot.getLineIntersectPoint(t, e, n[o], n[o + 1]);
      if (a)
        return a;
    }
    if (r) {
      let o = ot.getLineIntersectPoint(t, e, n[n[i(264)] - 1], n[0]);
      if (o)
        return o;
    }
    return null;
  }
}
function Js(s, t) {
  const e = vi();
  return (Js = function(n, r) {
    return e[n -= 174];
  })(s, t);
}
function vi() {
  const s = ["213UJlFDC", "1025811TOEGXU", "vertexCount", "40Nynxfd", "273283gbtbip", "575908NtrdIL", "endAngle", "1878100XMhROT", "3549160TlBFDc", "11KKwplF", "polygon", "7FHYkTU", "3803154lDXNgO", "8908Xigftx"];
  return (vi = function() {
    return s;
  })();
}
const Hh = Js;
(function() {
  const s = Js, t = vi();
  for (; ; )
    try {
      if (-parseInt(s(183)) / 1 + -parseInt(s(184)) / 2 + parseInt(s(179)) / 3 * (parseInt(s(178)) / 4) + parseInt(s(186)) / 5 + -parseInt(s(177)) / 6 * (-parseInt(s(176)) / 7) + -parseInt(s(182)) / 8 * (parseInt(s(180)) / 9) + parseInt(s(187)) / 10 * (parseInt(s(174)) / 11) === 391380)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Ue {
  static grid(t, e) {
    t = Math.max(t, 1);
    let n = [], r = 1 / ((e = Math.max(e, 1)) - 1), i = 1 / (t - 1);
    r == 1 / 0 && (r = 0), i == 1 / 0 && (i = 0);
    for (let o = 0; o < t; o++)
      for (let a = 0; a < e; a++) {
        let h = { y: o * i, x: a * r };
        n.push(h);
      }
    return n;
  }
  static innerGrid(t, e) {
    let n = [], r = 1 / (e + 1), i = 1 / (t + 1), o = r, a = i;
    for (let h = 0; h < t; h++)
      for (let l = 0; l < e; l++) {
        let c = { x: o + l * r, y: a + h * i };
        n.push(c);
      }
    return n;
  }
  static circle(t) {
    const e = Js;
    t.beginAngle = t.beginAngle || 0, t.endAngle = t[e(185)] || 2 * Math.PI, (t.vertexCount == null || t[e(181)] < 3) && (t.vertexCount = 3);
    let n = [], r = (t.endAngle - t.beginAngle) / t.vertexCount;
    for (let i = 0; i < t[e(181)]; i++) {
      let o = t.beginAngle + i * r;
      n.push({ x: Math.cos(o), y: Math.sin(o) });
    }
    return n;
  }
  static [Hh(175)](t) {
    return Ue.circle({ vertexCount: Math.max(3, t) });
  }
}
function _i() {
  var s = ["length", "17830920esHnlV", "4291LQFqik", "18ZlYhmc", "44360JbrASU", "696SVqQEH", "9368vIFYeg", "3342128eCeVEl", "1578OYSlPQ", "10154592aIFOnL", "2557758FPLAec"];
  return (_i = function() {
    return s;
  })();
}
function Si(s, t) {
  var e = _i();
  return (Si = function(n, r) {
    return e[n -= 371];
  })(s, t);
}
(function() {
  for (var s = Si, t = _i(); ; )
    try {
      if (-parseInt(s(371)) / 1 * (-parseInt(s(379)) / 2) + parseInt(s(373)) / 3 + -parseInt(s(381)) / 4 + -parseInt(s(378)) / 5 * (-parseInt(s(377)) / 6) + -parseInt(s(376)) / 7 * (-parseInt(s(380)) / 8) + parseInt(s(372)) / 9 + -parseInt(s(375)) / 10 === 655833)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Qe {
  constructor(t = 0, e = 0) {
    this[Si(374)] = 0, this.x = t, this.y = e;
  }
}
function xe(s, t) {
  const e = ki();
  return (xe = function(n, r) {
    return e[n -= 346];
  })(s, t);
}
function ki() {
  const s = ["length", "6UATiZH", "seg", "error segIndex:", "worldToLocalXY", "6979SerJao", "projectionLen", "abs", "430714cuBUln", "sqrt", "distancePoint", "isNode", "1281273ORDARi", "6203214OfmcID", "object", "segIndex", "1576227PFpAfX", "isLink", "dot", "343588OdmzxV", "distance", "10pCXhvz", "986240quKqrG"];
  return (ki = function() {
    return s;
  })();
}
function hn(s, t, e, n) {
  return Math[xe(353)]((e - s) * (e - s) + (n - t) * (n - t));
}
function Pi(s, t, e, n = 100, r = 1e-6) {
  const i = xe;
  let o = e;
  for (let a = 0; a < n; a++) {
    const h = t(o);
    if (Math[i(351)](h) < r)
      break;
    const l = o - s(o) / h;
    if (Math.abs(l - o) < r) {
      o = l;
      break;
    }
    o = l;
  }
  return o;
}
function Xh(s, t, e) {
  if (s.x == 0)
    return s.y > 0 ? s.y = e : s.y = -e, s;
  if (s.y == 0)
    return s.x > 0 ? s.x = t : s.x = -t, s;
  let n = s.y / s.x;
  if (s.x > 0) {
    let r = n * t;
    if (Math.abs(r) <= e)
      return s.x = t, s.y = r, s;
  } else {
    let r = n * t;
    if (Math.abs(r) <= e)
      return s.x = -t, s.y = -r, s;
  }
  if (s.y > 0) {
    let r = e / n;
    if (Math.abs(r) <= t)
      return s.x = r, s.y = e, s;
  } else {
    let r = e / n;
    if (Math.abs(r) <= t)
      return s.x = -r, s.y = -e, s;
  }
  return { x: 0, y: 0 };
}
function Da(s, t, e, n) {
  const r = xe, i = [s - e.x, t - e.y], o = [n.x - e.x, n.y - e.y], a = j.normalize([], o), h = j.len(o);
  let l;
  const c = j.dot(i, a);
  if (c > h)
    l = n;
  else if (c < 0)
    l = e;
  else {
    let d = j.multiplyC([1, 1], a, c);
    l = { x: e.x + d[0], y: e.y + d[1] };
  }
  let u = new Qe(l.x, l.y);
  return u.segLen = h, u[r(350)] = c, u.t = c / h, u;
}
function ys(s, t, e, n) {
  let r = [s.x - t.x, s.y - t.y], i = [e.x - t.x, e.y - t.y], o = r[0] * i[1] - r[1] * i[0];
  if (Math.abs(o) > n)
    return !1;
  let a = r[0] * i[0] + r[1] * i[1];
  return !(a < 0) && !(a > i[0] * i[0] + i[1] * i[1]);
}
(function() {
  const s = xe, t = ki();
  for (; ; )
    try {
      if (parseInt(s(349)) / 1 + parseInt(s(352)) / 2 + parseInt(s(360)) / 3 + -parseInt(s(363)) / 4 * (-parseInt(s(365)) / 5) + parseInt(s(368)) / 6 * (parseInt(s(356)) / 7) + -parseInt(s(366)) / 8 + -parseInt(s(357)) / 9 === 290052)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Yt = { clamp: function(s, t, e) {
  return e < s ? s : e > t ? t : e;
}, isHorizontal: function(s) {
  return Math.abs(Math.abs(s) % Math.PI) < 0.5;
}, getNearestPositionName: function(s, t) {
  const e = xe;
  let n = s[e(359)], r = s.t, i = s[e(358)], o = r >= 0.25 && r <= 0.75, a = r - 0.5, h = Math[e(351)](s.segLen * a);
  if (i[e(355)]) {
    if (h > t || !o)
      return null;
    if (n == 0)
      return te.ct;
    if (n == 1)
      return te.rm;
    if (n == 2)
      return te.cb;
    if (n == 3)
      return te.lm;
    throw new Error(e(347) + n);
  }
  if (i[e(361)]) {
    let l = i[e(348)](s.x, s.y);
    return A.distancePoint(l, i.getBeginPoint()) <= t ? Z.begin : A[e(354)](l, i.getEndPoint()) <= t ? Z.end : null;
  }
  throw new Error("unkwnow object!");
}, getNearestPointOnLines: function(s, t, e, n = !1) {
  const r = xe;
  if (e.length < 2)
    throw new Error("number of points is less than 2");
  let i = new Qe(e[0].x, e[0].y), o = Number.MAX_SAFE_INTEGER;
  for (let a = 0; a < e[r(367)] - 1; a++) {
    const h = e[a], l = e[a + 1], c = Da(s, t, h, l), u = A[r(364)](c.x, c.y, s, t);
    u < o && (i = c, i[r(346)] = [h, l], i.dist = u, i[r(359)] = a, o = u);
  }
  if (n) {
    const a = e[e.length - 1], h = e[0], l = Da(s, t, a, h), c = A.distance(l.x, l.y, s, t);
    c < o && (i = l, i[r(346)] = [a, h], i.dist = c, i.segIndex = e[r(367)] - 1, o = c);
  }
  return i;
}, getLineIntersectPoint: function(s, t, e, n, r = !1) {
  const i = xe, o = [t.x - s.x, t.y - s.y], a = [n.x - e.x, n.y - e.y], h = j.normalize([], [-o[1], o[0]]), l = j.normalize([], [-a[1], a[0]]), c = h[0], u = h[1], d = l[0], f = l[1], x = c * f - d * u;
  if (x == 0)
    return null;
  const m = j.dot(h, [s.x, s.y]), I = j[i(362)](l, [e.x, e.y]), y = { x: (f * m - u * I) / x, y: (c * I - d * m) / x };
  if (r == 0) {
    let S = 0;
    if (!ys(y, s, t, S) || !ys(y, e, n, S))
      return null;
  }
  return y;
}, isPointOnLineSegs: function(s, t, e, n) {
  const r = xe;
  for (let i = 0; i < t[r(367)] - 1; i++)
    if (ys(s, t[i], t[i + 1], n))
      return !0;
  return !!(e && ys(s, t[t[r(367)] - 1], t[0], n));
} }, W = Li;
(function() {
  const s = Li, t = Oi();
  for (; ; )
    try {
      if (parseInt(s(375)) / 1 * (parseInt(s(368)) / 2) + parseInt(s(364)) / 3 * (-parseInt(s(381)) / 4) + parseInt(s(383)) / 5 * (parseInt(s(398)) / 6) + -parseInt(s(396)) / 7 + parseInt(s(377)) / 8 * (parseInt(s(361)) / 9) + parseInt(s(362)) / 10 * (parseInt(s(393)) / 11) + -parseInt(s(370)) / 12 === 290096)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Jh = Object[W(365)], Yh = Object[W(387)], $t = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Yh(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Jh(t, e, i), i;
};
function Li(s, t) {
  const e = Oi();
  return (Li = function(n, r) {
    return e[n -= 361];
  })(s, t);
}
const ge = class sh {
  constructor() {
    const t = W;
    this[t(380)] = !0, this.vertices = [], this.anchors = sh[t(372)];
  }
  getAnchors() {
    return this.anchors;
  }
  hasAnchor(t) {
    return this[W(379)].has(t);
  }
  setConnections(t) {
    const e = W;
    this.anchors = /* @__PURE__ */ new Map();
    for (let n = 0; n < t[e(388)]; n++) {
      const r = t[n];
      let i = new Ae(r.name, r.x, r.y);
      i[e(363)] = r[e(363)] || nh.CONNECT_EDIT, this.anchors.set(r.name, i);
    }
  }
  getConnectionAnchor(t) {
    return this[W(379)].get(t);
  }
  getConnectionAnchors() {
    return this.anchors.values();
  }
  getIntersect(t, e, n) {
    const r = W, i = n[r(386)][r(369)];
    return Yt.getNearestPointOnLines(t, e, i, this.isClosed);
  }
  getConnectAutoPoint(t, e, n) {
    const r = W;
    let i = { x: t, y: e }, o = { x: n._obb.aabb.center, y: n._obb.aabb[r(373)] };
    return ot[r(366)](o, i, n._obb[r(369)], this.isClosed) || o;
  }
  toJSON() {
    let t = Ys(this, this._serializers, this._allwaysSerializers);
    return t.className = z.getObjectClassName(this), t;
  }
  static [W(397)](t) {
    const e = W;
    let n = t.namespace || t.className;
    if (z.hasShapeInstance(n)) {
      let i = z.getShape(n);
      return Object[e(382)](i, t), i;
    }
    let r = z.newInstance(t.className);
    return Object.assign(r, t), r;
  }
  static grid(t, e) {
    return Ue.grid(t, e);
  }
  static innerGrid(t, e) {
    return Ue[W(378)](t, e);
  }
  static circle(t) {
    return Ue[W(384)](t);
  }
  static [W(371)](t) {
    return Ue[W(371)](t);
  }
};
ge[W(372)] = /* @__PURE__ */ new Map(), $t([p("Shape")], ge.prototype, "className", 2), $t([p(!0)], ge.prototype, "isClosed", 2), $t([p(32)], ge[W(395)], W(376), 2), $t([p(32)], ge[W(395)], "height", 2), $t([p(!0)], ge.prototype, "isUnit", 2), $t([p(["className"])], ge.prototype, "_allwaysSerializers", 2), $t([p(["vertices", W(380), W(376), "height", W(390), "namespace"])], ge[W(395)], "_serializers", 2);
let $e = ge;
class rh extends $e {
  draw(t, e) {
    console.warn("not implement draw");
  }
}
$t([p("RegShape")], rh[W(395)], W(391), 2);
class ne extends $e {
  constructor(t) {
    super(), this.isClosed = !0, this.updatePoints(t);
  }
  updatePoints(t) {
    const e = W;
    this.vertices = t, this[e(367)] = !0;
  }
  draw(t, e) {
    const n = W, r = e._obb[n(385)];
    if (r == null || r.length == 0)
      return;
    let i = r[0];
    t.beginPath(), t.moveTo(i.x, i.y);
    for (let o = 1; o < r.length; o++)
      (r[o].x !== i.x || r[o].y !== i.y) && t.lineTo(r[o].x, r[o].y), i = r[o];
    this[n(380)] && (t.fill(), t[n(389)]()), e[n(394)].lineWidth > 0 && t.stroke();
  }
  [W(374)](t) {
    const e = W;
    return this[e(390)] = ot.rotatePoints(this.vertices, t), this[e(367)] = !0, this;
  }
  scale(t, e) {
    return this.vertices.forEach((n) => {
      n.x *= t, n.y *= e;
    }), this.vertices = ot.normalizePoints(this.vertices), this.dirty = !0, this;
  }
  skew(t, e) {
    const n = W;
    return this[n(390)].forEach((r) => {
      let i = r.x, o = r.y;
      r.x = i + o * e, r.y = o + i * t;
    }), this[n(390)] = ot[n(392)](this[n(390)]), this.dirty = !0, this;
  }
}
function Oi() {
  const s = ["length", "closePath", "vertices", "className", "normalizePoints", "2519VPJBtV", "_computedStyle", "prototype", "3400089wJcGnU", "fromJSON", "1493274zQmsDd", "107244PiJMfO", "4240OXlGBj", "usage", "42654vrmeCJ", "defineProperty", "getFirstIntersectPoint", "dirty", "435610ZtYuRW", "points", "2163648aqMepT", "polygon", "DefaultAnchors", "middle", "rotate", "2ASFbeR", "width", "184dUsWMU", "innerGrid", "anchors", "isClosed", "28AuvDDJ", "assign", "5zRxbdl", "circle", "localPoints", "_obb", "getOwnPropertyDescriptor"];
  return (Oi = function() {
    return s;
  })();
}
function Ei() {
  const s = ["2545269XQevkM", "10gpHPKm", "get", "set", "begin", "14497614KZXmKv", "hasOwnProperty", "EditInfo", "811275rSUrea", "40284jWEGpd", "parent", "push", "styleSystem", "3301879zXRgkD", "Shapes", "error", "fromJSON", "8nqheHg", "14078JCRvdW", "newInstance", "CustomStyle", "forEach", "1285296oUpcSS", "Styles", "isLink", "131WDiBiF", "assign"];
  return (Ei = function() {
    return s;
  })();
}
function Ti(s, t) {
  const e = Ei();
  return (Ti = function(n, r) {
    return e[n -= 338];
  })(s, t);
}
function Ps(s, t, e) {
  const n = Ti;
  let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), a = t.Roots, h = t.DisplayObjects || [], l = t[n(346)] || [], c = t[n(364)] || [], u = t.Resources || [], d = t.CustomStyle || {};
  if (t.SerializeType, h[n(344)]((y) => {
    const S = n;
    if (y.hasOwnProperty("userData") && !y[S(356)]("data")) {
      let v = y.userData;
      delete y.userData, y.data = v;
    }
    y.isLink && y.path == null && (y.path = [y[S(354)], y.end], delete y[S(354)], delete y.end);
  }), d.styles == null) {
    let y = {}, S = Object.keys(d);
    for (let v = 0; v < S.length; v++) {
      let L = S[v];
      L.startsWith(".") && (y[L] = d[L], delete d[L]);
    }
    d.styles = y;
  }
  l.forEach(function(y, S) {
    const v = n;
    i.set(S, Ut[v(339)](y, u));
  }), c.forEach(function(y, S) {
    const v = n;
    let L = $e.fromJSON(y);
    L != null ? (Object[v(349)](L, y), o.set(S, L)) : console[v(338)]("shape not exist:", y);
  });
  let f = [];
  const x = h.map(function(y, S) {
    const v = n;
    let L;
    e != null && (L = e.get(y)), L == null && (L = z[v(342)](y.className)), S < a.length && f[v(361)](L);
    let w = { resourcesArr: u, objJson: y, styleIndexMap: i, shapeIndexMap: o };
    return L._fromJSON(w), r[v(353)](S, L), L;
  });
  x.forEach((y) => {
    y.removeAllChildren();
  }), h[n(344)]((y, S) => {
    const v = n;
    let L = y.parent;
    if (L == null)
      return;
    let w = r[v(352)](L), T = x[S];
    T[v(360)] != null && T.removeFromParent(), w.addChild(T);
  });
  let m = h.filter((y) => y[n(347)]), I = x.filter((y) => y[n(347)]);
  return m.forEach(function(y, S) {
    I[S]._afterJson(y, r);
  }), t.EditInfo != null && s.editor != null && s.editor.fromEditInfo(t[n(357)], x), t[n(343)] != null && s[n(362)].fromJson(t), f;
}
$t([p("PolygonShape")], ne.prototype, "className", 2), $t([p(!0)], ne.prototype, "isClosed", 2), $t([p(!1)], ne[W(395)], W(367), 2), function() {
  const s = Ti, t = Ei();
  for (; ; )
    try {
      if (parseInt(s(348)) / 1 * (-parseInt(s(341)) / 2) + -parseInt(s(350)) / 3 + parseInt(s(345)) / 4 + -parseInt(s(358)) / 5 + parseInt(s(359)) / 6 + parseInt(s(363)) / 7 * (parseInt(s(340)) / 8) + parseInt(s(355)) / 9 * (parseInt(s(351)) / 10) === 477794)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
}();
const Pn = Ci;
function Ci(s, t) {
  const e = Di();
  return (Ci = function(n, r) {
    return e[n -= 328];
  })(s, t);
}
function Di() {
  const s = ["Objects", "1477248blYcpH", "146930dyiLyI", "then", "whenAllImagesLoaded", "3pcOViX", "267825cVVbkx", "1793475NcGrvL", "jsonToObjects", "8uevGPa", "79662FpvCvL", "Layer", "src", "12172fcQZuD", "length", "getProtoDefaultProperties", "type", "675122alKLeJ", "_restoreFromState"];
  return (Di = function() {
    return s;
  })();
}
(function() {
  const s = Ci, t = Di();
  for (; ; )
    try {
      if (parseInt(s(339)) / 1 + -parseInt(s(328)) / 2 * (-parseInt(s(331)) / 3) + parseInt(s(335)) / 4 * (-parseInt(s(332)) / 5) + parseInt(s(336)) / 6 + parseInt(s(343)) / 7 + -parseInt(s(346)) / 8 + parseInt(s(333)) / 9 === 102849)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const ih = class oh {
  constructor(t) {
    this.stage = t;
  }
  setNumberFixed(t) {
    oh.numberFixed = t;
  }
  objectsToJSON(t, e = Pn(345)) {
    return zs(this.stage, t, null, e);
  }
  [Pn(334)](t, e) {
    return Ps(this.stage, t, e);
  }
  static [Pn(341)](t) {
    let e = t._serializers, n = Object.getPrototypeOf(t), r = {};
    for (let i = 0; i < e.length; i++) {
      let o = e[i], a = n[o], h = t[o];
      h === a && (r[o] = h);
    }
    return r;
  }
  componentToObjects(t) {
    let e = JSON.parse(t);
    return Ps(this.stage, e);
  }
  objectsToComponent(t) {
    let e = this.objectsToJSON(t);
    return JSON.stringify(e);
  }
  fillByJson(t, e) {
    const n = Pn;
    let r = this, i = (t.Resources || []).filter((o) => o[n(342)] == "img").map((o) => o[n(338)]);
    return new Promise((o, a) => {
      const h = n;
      if (i[h(340)] == 0)
        return r[h(344)](t, e), void o(!0);
      pt[h(330)](i)[h(329)](() => {
        r[h(344)](t, e), o(!0);
      }).catch((l) => {
        a(l);
      });
    });
  }
  _getState(t, e) {
    const n = Pn;
    return zs(this.stage, [t], e, n(337));
  }
  _restoreFromState(t, e) {
    return Ps(this.stage, t, e);
  }
};
ih.numberFixed = 6;
let Ms = ih;
function Ai() {
  const s = ["80938SNItPI", "Resources", "56cGZnHV", "length", "map", "getObjectClassName", "flatten", "12FCGfuf", "getEmptyInstance", "DisplayObjects", "634960uosnSJ", "_beforeToJSON", "get", "editor", "6NehRRr", "customStyleToJSON", "getEditInfo", "64864qOWwjN", "2VCZwBY", "toString", "2747255aMdKTG", "4603872csOdWE", "Styles", "set", "11LubmPh", "6385090XvZfny", "forEach", "toJSON", "indexOf", "352386qaXGEX", "concat"];
  return (Ai = function() {
    return s;
  })();
}
function zs(s, t, e, n) {
  const r = gn;
  t = t.filter((h) => h.serializeable);
  const i = {};
  i.version = Ws;
  const o = function(h) {
    const l = gn;
    let c = [];
    h.length > 0 && (c = at[l(401)](h[0].children));
    for (let S = 1; S < h.length; S++) {
      let v = at.flatten(h[S].children, (L) => L.serializeable);
      c = c.concat(v);
    }
    let u = h[l(394)](c), d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), I = [], y = { objects: u, objIndexMap: d, styleIndexMap: f, styles: [], resourcesIndexMap: m, resources: I, shapeIndexMap: x, shapes: [], indexImage: function(S) {
      const v = l;
      let L = m[v(407)](S);
      if (L != null)
        return L;
      if (S instanceof HTMLImageElement) {
        let w = { type: "img", src: S.getAttribute("src") };
        return I.push(w), L = I[v(398)] - 1, m.set(S, L), L;
      }
      throw new Error("createImageIndex error");
    } };
    return u.forEach((S, v) => {
      S[l(406)](y), d.set(S, v);
    }), y;
  }(t);
  let a = o.objects;
  if (i.Roots = t[r(399)]((h, l) => l), i.Styles = o.styles, i.Shapes = o.shapes, i[r(396)] = o.resources, i[r(404)] = a.map(function(h) {
    const l = r;
    let c = h._toJSON(o);
    return e != null && e[l(387)](c, h), c;
  }), t.length > 0 && s[r(408)] != null) {
    let h = s.editor[r(411)](a, o.objIndexMap);
    h != null && (i.EditInfo = h);
  }
  return n == "Stage" && (i.CustomStyle = s.styleSystem[r(410)](o.indexImage)), i.SerializeType = n, i;
}
function gn(s, t) {
  const e = Ai();
  return (gn = function(n, r) {
    return e[n -= 383];
  })(s, t);
}
function Ys(s, t, e) {
  const n = gn;
  let r = z[n(400)](s), i = z[n(403)](r), o = {};
  if (e)
    for (let a = 0; a < e.length; a++) {
      let h = e[a];
      if (h == "className") {
        o[h] = r;
        continue;
      }
      let l = s[h];
      o[h] = l;
    }
  for (let a = 0; a < t.length; a++) {
    let h = t[a], l = s[h];
    if (l != i[h]) {
      if (Array.isArray(l) && Array.isArray(i[h])) {
        if (Gh(i[h], l))
          continue;
        o[h] = l;
      }
      l != null && (typeof l == "number" && Ms.numberFixed != null && (l = Uh(l, Ms.numberFixed)), l[n(391)] instanceof Function && (l = l.toJSON())), o[h] = l;
    }
  }
  return o;
}
function Uh(s, t) {
  const e = gn;
  if (Number.isInteger(s))
    return s;
  let n = s[e(383)]();
  return n.length - n[e(392)](".") - 1 > t && (s = s.toFixed(t), s = parseFloat(s)), s;
}
function Gh(s, t) {
  if (s === t)
    return !0;
  if (s.length != t.length)
    return !1;
  for (let e = 0; e < s.length; e++)
    if (s[e] != t[e])
      return !1;
  return !0;
}
(function() {
  const s = gn, t = Ai();
  for (; ; )
    try {
      if (-parseInt(s(413)) / 1 * (parseInt(s(395)) / 2) + parseInt(s(402)) / 3 * (parseInt(s(412)) / 4) + -parseInt(s(405)) / 5 * (-parseInt(s(409)) / 6) + parseInt(s(384)) / 7 + -parseInt(s(397)) / 8 * (-parseInt(s(393)) / 9) + parseInt(s(389)) / 10 * (-parseInt(s(388)) / 11) + parseInt(s(385)) / 12 === 522608)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const _t = is;
(function() {
  const s = is, t = Wi();
  for (; ; )
    try {
      if (parseInt(s(487)) / 1 * (-parseInt(s(486)) / 2) + -parseInt(s(504)) / 3 + parseInt(s(505)) / 4 + parseInt(s(490)) / 5 * (parseInt(s(479)) / 6) + -parseInt(s(495)) / 7 + -parseInt(s(485)) / 8 * (-parseInt(s(496)) / 9) + -parseInt(s(494)) / 10 === 820156)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Vh = Object.defineProperty, qh = Object.getOwnPropertyDescriptor, bn = (s, t, e, n) => {
  const r = is;
  for (var i, o = n > 1 ? void 0 : n ? qh(t, e) : t, a = s[r(481)] - 1; a >= 0; a--)
    (i = s[a]) && (o = (n ? i(t, e, o) : i(o)) || o);
  return n && o && Vh(t, e, o), o;
};
class Us extends ne {
  constructor() {
    const t = is;
    super([{ x: -1, y: -1 }, { x: 1, y: -1 }, { x: 1, y: 1 }, { x: -1, y: 1 }]), this.isClosed = !0, this[t(484)] = !1;
  }
  [_t(493)](t, e) {
    const n = _t;
    let r = e._drawContentDesc.shapeSize, i = e._computedStyle.lineWidth;
    t[n(488)](), t.rect(-r.width / 2, -r[n(492)] / 2, r.width, r[n(492)]), t.fill(), i > 0 && t[n(503)]();
  }
}
function is(s, t) {
  const e = Wi();
  return (is = function(n, r) {
    return e[n -= 476];
  })(s, t);
}
bn([p("Rect")], Us[_t(482)], "className", 2);
class Ni extends $e {
  constructor() {
    super();
  }
  draw(t, e) {
    const n = _t;
    let r = e[n(501)].shapeSize;
    t.beginPath(), t.ellipse(0, 0, r[n(483)] / 2, r[n(492)] / 2, 0, 0, 2 * Math.PI), t.fill(), e[n(500)].lineWidth > 0 && t.stroke();
  }
  getIntersect(t, e, n) {
    const r = _t, i = 0.5 * n._obb[r(478)].width, o = 0.5 * n._obb.aabb.height, a = n._obb.aabb.center, h = n[r(491)].aabb[r(497)];
    let l = t - a, c = e - h, u = Math.atan2(c * i, l * o), d = { x: a + i * Math.cos(u), y: h + o * Math.sin(u) }, f = t - d.x, x = e - d.y, m = Math[r(502)](f * f + x * x), I = new Qe(d.x, d.y);
    return I.t = u / (2 * Math.PI), I[r(489)] = m, I;
  }
  [_t(480)](t, e, n) {
    const r = _t, i = 0.5 * n._obb.aabb.width, o = 0.5 * n._obb.aabb.height, a = n[r(491)][r(478)].center, h = n._obb[r(478)].middle;
    let l = t - a, c = e - h, u = Math[r(477)](c * i, l * o);
    return { x: a + i * Math[r(476)](u), y: h + o * Math.sin(u) };
  }
}
bn([p("Ellipse")], Ni[_t(482)], "className", 2);
class Mi extends ne {
  constructor() {
    super([{ x: -1, y: -1 }, { x: 1, y: 0 }, { x: -1, y: 1 }]);
  }
}
bn([p("Triangle")], Mi[_t(482)], _t(498), 2);
class zi extends ne {
  constructor() {
    super([{ x: -1, y: -1 }, { x: 1, y: 0 }, { x: -1, y: 1 }, { x: 1, y: 0 }, { x: -1, y: 0 }]), this.isClosed = !1;
  }
  draw(t, e) {
    const n = _t;
    let r = e[n(501)].shapeSize, i = e._computedStyle.lineWidth, o = r.width / 2, a = r.height / 2;
    t.beginPath(), t[n(499)](-o, -a), t.lineTo(o, 0), t.lineTo(-o, a), t.moveTo(-o - 0.5 * i, 0), t.lineTo(o, 0), i > 0 && t[n(503)]();
  }
}
bn([p("Arrow")], zi[_t(482)], "className", 2);
class ji extends ne {
  constructor() {
    super([{ x: 0, y: -1 }, { x: 1, y: 0 }, { x: 0, y: 1 }, { x: -1, y: 0 }]);
  }
}
bn([p("Diamond")], ji.prototype, "className", 2);
class Bi extends Us {
  constructor() {
    super();
  }
  draw(t, e) {
    const n = _t;
    let r = e.arrowsSize, i = 0.5 * -e[n(483)], o = 0.5 * -e[n(492)], a = e.width, h = e.height - r;
    t[n(488)](), t[n(499)](i, o), t.lineTo(i + a, o), t.lineTo(i + a, o + h), t.lineTo(r - 2 + 0, o + h), t.lineTo(0, o + h + r), t.lineTo(0 - (r - 2), o + h), t.lineTo(i, o + h), t.lineTo(i, o), t.fill(), e._computedStyle.lineWidth > 0 && t[n(503)]();
  }
}
function Wi() {
  const s = ["6JWmWcj", "getConnectAutoPoint", "length", "prototype", "width", "isUnit", "2696EVJlns", "1740914sLPash", "1WOarfI", "beginPath", "dist", "2413685xUczfr", "_obb", "height", "draw", "4902190AGvnha", "1334452qrZshP", "25983MJpvIw", "middle", "className", "moveTo", "_computedStyle", "_drawContentDesc", "sqrt", "stroke", "9528lfgjnJ", "3675952AZpxGN", "cos", "atan2", "aabb"];
  return (Wi = function() {
    return s;
  })();
}
bn([p("Tip")], Bi[_t(482)], _t(498), 2);
const ms = Gs;
function Gs(s, t) {
  const e = Ri();
  return (Gs = function(n, r) {
    return e[n -= 364];
  })(s, t);
}
function Ri() {
  const s = ["restore", "_computedStyle", "619484LUvycE", "width", "2138762rJZinv", "fillStyle", "7006752mdUUTV", "getShapes", "height", "newInstance", "ShapeNode", "padding", "940233cNSKOp", "white", "save", "964838eOmxDa", "getContext", "getShape", "5345436nieHkb", "5560265qvaLdN", "size", "4eARuUx"];
  return (Ri = function() {
    return s;
  })();
}
(function() {
  const s = Gs, t = Ri();
  for (; ; )
    try {
      if (parseInt(s(385)) / 1 + -parseInt(s(365)) / 2 + parseInt(s(373)) / 3 + -parseInt(s(382)) / 4 * (-parseInt(s(380)) / 5) + parseInt(s(379)) / 6 + -parseInt(s(376)) / 7 + -parseInt(s(367)) / 8 === 852795)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class ah {
  constructor() {
    z._sysRegClass(Us), z._sysRegClass(Ni), z._sysRegClass(Mi), z._sysRegClass(zi), z._sysRegClass(ji), z._sysRegClass(Bi), z._sysRegClass(ne);
  }
  getShapes(t) {
    return z[Gs(368)](t);
  }
  [ms(378)](t) {
    const e = ms;
    return z.hasShapeInstance(t) ? z[e(378)](t) : z.getEmptyInstance(t);
  }
  drawToCanvas(t, e, n = { size: 42, strokeStyle: "gray", fillStyle: ms(374), padding: 0 }) {
    const r = ms;
    let i = n[r(381)] || 42, o = i, a = i, h = e[r(377)]("2d");
    h[r(375)](), h.strokeStyle = n.strokeStyle || "gray", h[r(366)] = n.fillStyle || "white", h.translate(e[r(364)] / 2, e[r(369)] / 2);
    let l = z[r(370)](r(371));
    return Object.assign(l, { x: 0, y: 0, width: o, height: a }), l.setShape(t), Object.assign(l[r(384)], { lineWidth: 1, padding: n[r(372)] || 0 }), l.updateMatrix(), l._updateShapeSize(), t.draw(h, l), h[r(383)](), e;
  }
}
const os = new ah(), xs = Fi;
function Fi(s, t) {
  const e = Hi();
  return (Fi = function(n, r) {
    return e[n -= 433];
  })(s, t);
}
(function() {
  const s = Fi, t = Hi();
  for (; ; )
    try {
      if (-parseInt(s(450)) / 1 * (-parseInt(s(434)) / 2) + parseInt(s(445)) / 3 * (parseInt(s(446)) / 4) + -parseInt(s(441)) / 5 + parseInt(s(435)) / 6 * (-parseInt(s(443)) / 7) + parseInt(s(433)) / 8 * (parseInt(s(440)) / 9) + parseInt(s(436)) / 10 * (-parseInt(s(449)) / 11) + -parseInt(s(438)) / 12 * (-parseInt(s(437)) / 13) === 311758)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class jt {
  static [xs(448)](t, e) {
    return t[xs(444)](e, 1);
  }
  static remove(t, e) {
    let n = t.indexOf(e);
    return n == -1 ? -1 : (t.splice(n, 1), n);
  }
  static swapWithRight(t, e) {
    const n = e.indexOf(t);
    if (n === e.length - 1)
      return !1;
    const r = e[n + 1];
    return e[n] = r, e[n + 1] = t, !0;
  }
  static [xs(439)](t, e) {
    const n = e.indexOf(t);
    if (n === 0)
      return !1;
    const r = e[n - 1];
    return e[n] = r, e[n - 1] = t, !0;
  }
  static moveToTail(t, e) {
    const n = xs, r = e[n(447)](t);
    if (r === e.length - 1)
      return console.log("已经在末尾"), !1;
    e[r - 1];
    const i = e[r];
    for (let o = r; o < e.length - 1; o++)
      e[o] = e[o + 1];
    return e[e[n(442)] - 1] = i, !0;
  }
  static moveToHead(t, e) {
    const n = e.indexOf(t);
    if (n === 0)
      return !1;
    const r = e[n];
    for (let i = n; i > 0; i--)
      e[i] = e[i - 1];
    return e[0] = r, !0;
  }
}
function Hi() {
  const s = ["swapWithLeft", "4170402ESiZZv", "2857575wToenN", "length", "1346429CClEXb", "splice", "15477mycLvy", "104fwazMm", "indexOf", "removeAt", "3751198yJPvtH", "25661WtdcuK", "8xVRStZ", "2HHnAUk", "6gXgxjf", "10ZRLpHB", "10315045ziMwjh", "12eGVjSt"];
  return (Hi = function() {
    return s;
  })();
}
var It = Ji;
function Xi() {
  var s = ["allocate", "191557XmIDHF", "defineProperty", "16910wbBEDF", "64oTLZee", "visible", "identity", "_visible", "_doTransform", "_obb", "_worldTransform", "_matrixDirty", "3193150ZGqbMj", "5271EbcIQG", "4226312EQajRn", "destroy", "1418376crDHDW", "5052mousrA", "listeners", "45915qEaQYW", "getWorldTransform", "_state", "show", "612skopgE"];
  return (Xi = function() {
    return s;
  })();
}
(function() {
  for (var s = Ji, t = Xi(); ; )
    try {
      if (parseInt(s(258)) / 1 + parseInt(s(237)) / 2 * (parseInt(s(252)) / 3) + parseInt(s(249)) / 4 + parseInt(s(245)) / 5 + -parseInt(s(250)) / 6 * (parseInt(s(246)) / 7) + -parseInt(s(247)) / 8 + -parseInt(s(256)) / 9 * (parseInt(s(236)) / 10) === 397238)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Kh = Object[It(235)], Zh = Object.getOwnPropertyDescriptor, mr = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Zh(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Kh(t, e, i), i;
};
function Ji(s, t) {
  var e = Xi();
  return (Ji = function(n, r) {
    return e[n -= 235];
  })(s, t);
}
class Ls extends we {
  constructor() {
    var t = It;
    super(), this._matrixDirty = !0, this[t(254)] = { _needPaint: !0, _isOutOfViewport: !1, _attrDirty: !0 }, this._localTransform = wt.allocate(), this._worldTransform = wt[t(257)](), this[t(242)] = new pe();
  }
  _getLocalTransform() {
    var t = It;
    let e = this._localTransform;
    return e[t(239)](), this[t(241)](e), e;
  }
  [It(253)]() {
    return this[It(243)];
  }
  markDirty() {
    this[It(244)] = !0;
  }
  get visible() {
    return this[It(240)];
  }
  set visible(t) {
    this[It(240)] = t, this._matrixDirty = !0;
  }
  [It(255)]() {
    var t = It;
    return !this.visible && (this[t(238)] = !0), this;
  }
  hide() {
    var t = It;
    return this.visible && (this[t(238)] = !1), this;
  }
  isVisible() {
    return this[It(238)];
  }
  [It(248)]() {
    var t = It;
    this[t(238)] = !1, this[t(251)] = null, this.destroyed = !0;
  }
}
mr([p(!0)], Ls.prototype, It(240), 2), mr([p(!1)], Ls.prototype, "painted", 2), mr([p(!1)], Ls.prototype, "destroyed", 2);
const g = cn;
function cn(s, t) {
  const e = Yi();
  return (cn = function(n, r) {
    return e[n -= 277];
  })(s, t);
}
(function() {
  const s = cn, t = Yi();
  for (; ; )
    try {
      if (-parseInt(s(313)) / 1 * (-parseInt(s(364)) / 2) + -parseInt(s(280)) / 3 + parseInt(s(314)) / 4 * (parseInt(s(331)) / 5) + parseInt(s(374)) / 6 + parseInt(s(328)) / 7 + parseInt(s(378)) / 8 * (parseInt(s(319)) / 9) + -parseInt(s(337)) / 10 * (parseInt(s(304)) / 11) === 318570)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Qh = Object.defineProperty, $h = Object.getOwnPropertyDescriptor, J = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? $h(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Qh(t, e, i), i;
};
function Yi() {
  const s = ["indexImage", "pointerupHandler", "unshift", "_findChildren", "_state", "_scaleX", "styleIndexMap", "sortChildren", "isSelected", "outLinks", "_skewY", "dropAllowed", "ownerLayer", "_worldTransform", "clearStyles", "_attrDirty", "6iQnOCd", "slice", "_height", "points", "getOutLinks", "pointeroutHandler", "styles", "name", "addInLink", "_shape", "1001328FyeqPJ", "pointerEnabled", "_treeDirty", "pointerupEvent", "4126808CmAozA", "dragEndHandler", "className", "_invertWorldTransform", "objJson", "removeClass", "querySelector", "forEach", "dispatchEvent", "parent", "invert", "worldToLocalXY", "height", "inLinks", "lerpOnLines", "pointerenterEvent", "addEventListener", "deep", "prototype", "_rotation", "1413783YESNja", "length", "segIndex out of bounds.", "setStyle", "pointerenterHandler", "aabb", "_matrixDirty", "pickable", "addOutLink", "startsWith", "match", "_zIndex", "indexOf", "top", "identity", "map", "writable", "isClosed", "scale", "addChild", "showSelected", "toAABB", "log", "getShape", "33klrPkU", "selectedEvent", "updateZIndex", "atan2", "push", "_skewX", "draggable", "assign", "toJSON", "46361CabHGO", "32GcGZJk", "dragEvent", "data", "rotation", "pointeroutEvent", "9tWOhFx", "removeChildren", "pointXY", "style", "isLink", "EventInstances", "translateWith", "removeChild", "_localTransform", "2274006bPUjMK", "attributes", "getLocalPoint", "505BcyTaJ", "appendChild", "scaleY", "remove", "_scaleY", "children", "1192190QAROTY", "setAttributes", "getPrototypeOf", "zIndex", "_obb", "show", "removeAt", "concat", "hide", "_updateTree", "removeAllChildren"];
  return (Yi = function() {
    return s;
  })();
}
const H = class Dn extends Ls {
  constructor() {
    const t = cn;
    super(), this._x = 0, this._y = 0, this.data = {}, this[t(329)] = {}, this.children = [], this.style = new Ut(), this._computedStyle = new Ut(), this.classList = [], this[t(391)] = [], this.outLinks = [];
  }
  translate(t, e) {
    return this.x = t, this.y = e, this;
  }
  [g(298)](t, e) {
    const n = g;
    return this.scaleX = t, this[n(333)] = e, this;
  }
  rotate(t) {
    return this[g(317)] = t, this;
  }
  [g(338)](t) {
    return this[g(352)]._attrDirty = !0, Object.assign(this.attributes, t), this;
  }
  removeAttribute(t) {
    delete this[g(329)][t], this._state._attrDirty = !0;
  }
  setAttribute(t, e) {
    const n = g;
    this.attributes[t] = e, this[n(352)][n(363)] = !0;
  }
  getAttribute(t, e) {
    let n = this.attributes[t];
    return n ?? e;
  }
  getAABB(t) {
    if (this._matrixDirty && this.updateMatrix(), t != 1)
      return this._obb.aabb;
    let e = Dn.flatten([this]).map((n) => n._obb.aabb);
    return E.unionRects(e);
  }
  dragHandler(t) {
    const e = g;
    if (this[e(386)](Q.EventInstances[e(315)]), this[e(375)] == 0 || this.draggable == 0)
      return;
    let n = this.parent.getWorldTransform()[e(388)]().vec([1, 1], [t.dxInWorld, t.dyInWorld]);
    this[e(325)](n[0], n[1]);
  }
  [g(303)]() {
    return this[g(373)];
  }
  getStyle(t) {
    return this.style[t];
  }
  css(t) {
    return this.setStyles(t);
  }
  setStyles(t) {
    return Object.assign(this.style, t), this.style.dirty = !0, this;
  }
  [g(283)](t, e) {
    const n = g;
    return this.style[t] = e, this[n(322)].dirty = !0, this;
  }
  getComputedStyle() {
    return this._computedStyle;
  }
  [g(362)]() {
    const t = g;
    let e = Object.keys(this.style);
    for (let n = 0; n < e[t(281)]; n++) {
      let r = e[n];
      r != "dirty" && delete this.style[r];
    }
    return this[t(322)].dirty = !0, this;
  }
  addClass(t) {
    const e = g;
    if (t.charAt(0) !== ".")
      throw new Error('error: style class must be startWith "."');
    return jt.remove(this.classList, t), this.classList[e(308)](t), this.style.dirty = !0, this;
  }
  [g(383)](t) {
    jt.remove(this.classList, t), this.style.dirty = !0;
  }
  hasClass(t) {
    return this.classList.indexOf(t) != -1;
  }
  removeAllClass() {
    return this.classList.length = 0, this.style.dirty = !0, this;
  }
  isConnected() {
    return this[g(391)].length > 0 || this.outLinks.length > 0;
  }
  getPoint(t, e) {
    let n = this.getLocalPoint(t, e);
    return n.x += this.x, n.y += this.y, n;
  }
  [g(330)](t, e) {
    const n = g;
    let r = this._obb.localPoints;
    if (r == null && (r = this._getOBBPoints()), e != null) {
      let i = this._shape[n(297)] ? r.length : r.length - 1;
      if (e > i)
        throw console.log(e, i), new Error(n(282));
      let o = e + 1;
      o == r.length && (o = 0);
      let a = r[e], h = r[o];
      if (a == null || h == null)
        throw console.log(a, h, r), console.log(t, e, o), new Error("beginPoint or endPoint is null");
      r = [a, h];
    }
    return A[n(392)](r, t, this._shape[n(297)]);
  }
  [g(351)](t, e = !1) {
    const n = g;
    let r = this.children, i = [];
    for (let o = 0; o < r[n(281)]; o++) {
      let a = r[o];
      if (t(a) && i.push(a), e) {
        let h = a._findChildren(t, e);
        i = i[n(344)](h);
      }
    }
    return i;
  }
  _findChild(t, e = !1) {
    let n = this[g(336)];
    for (let r = 0; r < n.length; r++) {
      let i = n[r];
      if (t(i))
        return i;
      if (e)
        return i._findChild(t, e);
    }
    return null;
  }
  querySelectorAll(t) {
    let e = Aa(t);
    return this._findChildren(e, !0);
  }
  [g(384)](t) {
    let e = Aa(t);
    return this._findChild(e, !0);
  }
  getInLinks() {
    return this.inLinks;
  }
  [g(368)]() {
    return this.outLinks;
  }
  pointerdownHandler(t) {
    const e = g;
    this[e(375)] == 1 && this.dispatchEvent(Q[e(324)].pointerdownEvent);
  }
  [g(349)](t) {
    const e = g;
    this.pointerEnabled == 1 && this.dispatchEvent(Q.EventInstances[e(377)]);
  }
  pointermoveHandler(t) {
    this.pointerEnabled == 1 && this.dispatchEvent(Q.EventInstances.pointermoveEvent);
  }
  [g(284)](t) {
    const e = g;
    this[e(375)] == 1 && this.dispatchEvent(Q[e(324)][e(393)]);
  }
  [g(369)](t) {
    const e = g;
    this.pointerEnabled == 1 && this.dispatchEvent(Q.EventInstances[e(318)]);
  }
  [g(379)](t) {
    const e = g;
    this.pointerEnabled == 1 && this.dispatchEvent(Q[e(324)].dragEndEvent);
  }
  clickHandler(t) {
    const e = g;
    this.pointerEnabled == 1 && this[e(386)](Q[e(324)].clickEvent);
  }
  dblclickHandler(t) {
    this.pointerEnabled == 1 && this.dispatchEvent(Q.EventInstances.dblclickEvent);
  }
  dropHandler(t) {
    const e = g;
    this.dispatchEvent(Q[e(324)].dropEvent);
  }
  dragoverHandler(t) {
    const e = g;
    this.dispatchEvent(Q[e(324)].dropoverEvent);
  }
  dragoutHandler(t) {
    this.dispatchEvent(Q.EventInstances.dropoutEvent);
  }
  selectedHandler() {
    const t = g;
    this.pointerEnabled == 1 && (this[t(356)] = !0, this._matrixDirty = !0, this.dispatchEvent(Q.EventInstances[t(305)]));
  }
  unselectedHandler() {
    const t = g;
    this._matrixDirty = !0, this[t(356)] = !1, this.pointerEnabled == 1 && this.dispatchEvent(Q.EventInstances.unselectedEvent);
  }
  [g(332)](t) {
    const e = g;
    this[e(286)] = !0;
    let n = this;
    if (t.parent != null)
      throw console[e(302)](t), new Error("child already has parent");
    if (n === t)
      throw console.log(n), new Error("can not add self as child");
    return t.parent = n, t[e(277)] = n.deep + 1, n[e(360)] && (t[e(360)] = n[e(360)]), t.ownerLayer != null && (t[e(360)]._treeDirty = !0), n.children.push(t), t.hasChildren() && t._updateTree(!0), this;
  }
  sortChildren(t) {
    return this.children.sort(t), this._matrixDirty = !0, this.ownerLayer && (this.ownerLayer._treeDirty = !0), this;
  }
  [g(346)](t = !1) {
    const e = g;
    if (this.children.length <= 0)
      return;
    const n = this[e(336)];
    for (let r = 0; r < n.length; r++) {
      const i = n[r];
      i._matrixDirty = !0, i.deep = this.deep + 1, i.ownerLayer = this[e(360)], t && i._updateTree(t);
    }
  }
  getChildren() {
    return this.children;
  }
  hasChild(t) {
    const e = g;
    return this[e(336)][e(292)](t) != -1;
  }
  hasChildren() {
    return this.children.length > 0;
  }
  removeFromParent() {
    return this[g(387)] && this.parent.removeChild(this), this;
  }
  append(...t) {
    const e = g;
    for (let n = 0; n < t.length; n++) {
      let r = t[n];
      r.parent = this, this.deep < Q.MinDeep && (r[e(360)] = this, r[e(360)][e(376)] = !0), this.children[e(308)](r);
    }
    return this._matrixDirty = !0, this._updateTree(!0), this;
  }
  prepend(...t) {
    const e = g;
    for (let n = 0; n < t.length; n++) {
      let r = t[n];
      r.parent = this, this.deep < Q.MinDeep && (r[e(360)] = this, r[e(360)]._treeDirty = !0), this.children[e(350)](r);
    }
    return this._matrixDirty = !0, this._updateTree(!0), this;
  }
  [g(326)](t) {
    const e = g;
    t._matrixDirty = !0, this._matrixDirty = !0, t.ownerLayer && (t.ownerLayer[e(376)] = !0), t.ownerLayer = null, t.parent = null;
    let n = this.children.indexOf(t);
    return n != -1 && (jt[e(343)](this.children, n), t.hasChildren() && t[e(346)](!0)), this;
  }
  [g(320)](t) {
    const e = g;
    this._matrixDirty = !0;
    for (let n = 0; n < t.length; n++) {
      let r = t[n];
      r._matrixDirty = !0, r.ownerLayer && (r.ownerLayer._treeDirty = !0), r.ownerLayer = null, r[e(387)] = null;
      let i = this.children.indexOf(r);
      i != -1 && jt.removeAt(this.children, i);
    }
    return this._updateTree(!0), this;
  }
  [g(347)]() {
    const t = g;
    let e = this.children[t(365)]();
    for (let n = 0; n < e.length; n++)
      this.removeChild(e[n]);
    return this;
  }
  hideAllChildren() {
    return this.children.forEach(function(t) {
      t[cn(345)]();
    }), this;
  }
  showAllChildren() {
    return this.children.forEach(function(t) {
      t[cn(342)]();
    }), this;
  }
  getChildrenAABB(t) {
    const e = g;
    let n = (t ? Dn.flatten(this.children) : this.children)[e(295)]((r) => r[e(341)][e(285)]);
    return E.unionRects(n);
  }
  getRoot() {
    const t = g;
    let e = this;
    for (; e[t(387)] != null; )
      e = e[t(387)];
    return e;
  }
  [g(389)](t, e) {
    return this.getWorldTransform().invert().pointXY(t, e);
  }
  localToWorldXY(t, e) {
    const n = g;
    return this.getWorldTransform()[n(321)](t, e);
  }
  [g(372)](t) {
    const e = g;
    return this.inLinks == null && (this.inLinks.length = 0), this[e(391)].push(t), this;
  }
  [g(288)](t) {
    const e = g;
    return this.outLinks.push(t), this._matrixDirty = !0, t[e(286)] = !0, this;
  }
  removeInLink(t) {
    const e = g;
    return jt[e(334)](this[e(391)], t), this[e(286)] = !0, t._matrixDirty = !0, this;
  }
  removeOutLink(t) {
    return jt.remove(this.outLinks, t), this._matrixDirty = !0, t._matrixDirty = !0, this;
  }
  getLinks() {
    const t = g;
    let e = [];
    return this.inLinks && (e = e.concat(this[t(391)])), this[t(357)] && (e = e.concat(this[t(357)])), e;
  }
  getOBB() {
    return this._obb;
  }
  updateMatrix() {
    const t = g;
    this._localTransform[t(294)](), this._doTransform(this[t(327)]), this[t(387)] != null ? wt.multiply(this[t(361)], this.parent[t(361)], this._localTransform) : wt.fillFrom(this._worldTransform, this._localTransform.m), this[t(323)] && wt[t(388)](this[t(381)], this._worldTransform);
    let e = this[t(341)];
    e.localPoints = this._getOBBPoints();
    let n = this._worldTransform.points(e[t(367)], e.localPoints);
    if (this.isLink) {
      let r = this._getTotalLineWidth();
      pe[t(301)](e.aabb, n, r);
    } else
      pe[t(301)](e.aabb, n);
    return this._afterUpdateMatrix(), this;
  }
  _afterUpdateMatrix() {
  }
  _afterStyleComputed() {
  }
  _clearMatrixDirtyMark() {
    this[g(286)] = !1;
  }
  getK(t, e = null) {
    const n = g;
    let r = this.getPoint(t - 1e-6, e), i = this.getPoint(t + 1e-6, e), o = i.x - r.x, a = i.y - r.y;
    return Math[n(307)](a, o);
  }
  isOutOfParent() {
    const t = g;
    let e = this, n = e.parent;
    if (n != null && n.parent != null) {
      const r = e._obb.aabb;
      return !n[t(341)][t(285)].isIntersectRect(r);
    }
    return !1;
  }
  contains(t) {
    const e = g;
    if (t === this || this.children.includes(t))
      return !0;
    for (let n = 0; n < this[e(336)].length; n++)
      if (this[e(336)][n].contains(t))
        return !0;
    return !1;
  }
  [g(287)]() {
    return this.pointerEnabled;
  }
  destroy() {
    const t = g;
    super.destroy(), this[t(375)] = !1, this[t(391)].forEach((e) => {
      e.unlinkEnd();
    }), this.outLinks[t(385)]((e) => {
      e.unlinkBegin();
    }), this.inLinks.length = 0, this.outLinks.length = 0, this.parent && this.parent[t(326)](this), this[t(371)] = null, this.style = null, this.children.length = 0, this[t(327)].release(), this._worldTransform.release(), this._invertWorldTransform && this._invertWorldTransform.release(), this._obb.points.length = 0, this.type = null, this.data = null, this[t(329)].length = 0, this[t(352)] = null;
  }
  static flatten(t, e, n) {
    const r = g;
    let i = [];
    if (n) {
      let o = [];
      for (let a = 0; a < t.length; a++) {
        let h = t[a];
        h.parent != null && (e == null || e(h) == 1) && (o.push(h), i.push(h));
      }
      for (let a = 0; a < o[r(281)]; a++) {
        let h = o[a];
        if (h[r(387)] != null && h.children && h.children.length > 0) {
          let l = Dn.flatten(h[r(336)], e, n);
          i = i.concat(l);
        }
      }
      return i;
    }
    for (let o = 0; o < t[r(281)]; o++) {
      let a = t[o];
      if (a.parent != null && (e == null || e(a) == 1) && (i.push(a), a.children && a[r(336)].length > 0)) {
        let h = Dn.flatten(a[r(336)], e);
        i = i.concat(h);
      }
    }
    return i;
  }
  [g(312)]() {
    return this._toJSON();
  }
  _toJSON(t) {
    const e = g;
    let n = Ys(this, this._serializers, this._allwaysSerializers);
    if (t != null) {
      let r = t.objIndexMap, i = t.styleIndexMap;
      if (r) {
        let o = i.get(this.style);
        o != null && (n.style = o);
      }
      if (r && this.parent != null) {
        let o = r.get(this.parent);
        o != null && (n.parent = o);
      }
    }
    return n.data != null && (Object.keys(n.data)[e(281)] == 0 ? delete n.data : n.data = JSON.parse(JSON.stringify(n[e(316)]))), n[e(329)] != null && (Object.keys(n.attributes).length == 0 ? delete n.attributes : n.attributes = JSON.parse(JSON.stringify(n.attributes))), n;
  }
  _beforeToJSON(t) {
    const e = g;
    let n = this[e(322)];
    if (t[e(354)].get(n) == null) {
      let r = n.toJSON(t[e(348)]);
      if (Object.keys(r)[e(281)] > 0) {
        let i = t.styles[e(281)];
        t.styleIndexMap.set(n, i), t[e(370)].push(r);
      }
    }
  }
  _fromJSON(t) {
    const e = g, n = this, r = t.objJson;
    let i = n._serializers, o = Object[e(339)](n);
    if (i.forEach((a) => {
      const h = e;
      if (r.hasOwnProperty(a)) {
        let l = Object.getOwnPropertyDescriptor(n, a);
        if (l == null && (l = Object.getOwnPropertyDescriptor(o, a)), l != null && l[h(296)] == 0)
          return;
        let c = r[a];
        c != null && c.className != null && (c = z.newInstance(c.className), Object[h(311)](n, c)), n[a] = c;
      }
    }), t[e(382)][e(322)] != null) {
      let a = t.styleIndexMap.get(t[e(382)][e(322)]);
      n.style = a;
    }
  }
  update() {
    this.ownerLayer != null && (this.ownerLayer._requestReapint = !0);
  }
  [g(394)](t, e) {
    super[g(394)](t, e);
  }
  removeEventListener(t, e) {
    super.removeEventListener(t, e);
  }
  getConnectAutoPoint(t) {
    return this[g(373)].getConnectAutoPoint(t.x, t.y, this);
  }
  get x() {
    return this._x;
  }
  set x(t) {
    this._x !== t && (this._matrixDirty = !0), this._x = t;
  }
  get y() {
    return this._y;
  }
  set y(t) {
    this._y !== t && (this._matrixDirty = !0), this._y = t;
  }
  get z() {
    return this._z;
  }
  set z(t) {
    this._z !== t && (this._matrixDirty = !0), this._z = t;
  }
  get width() {
    return this._width;
  }
  set width(t) {
    this.width !== t && (this._matrixDirty = !0), this._width = t;
  }
  get height() {
    return this[g(366)];
  }
  set height(t) {
    this[g(366)] !== t && (this._matrixDirty = !0), this._height = t;
  }
  get rotation() {
    return this[g(279)];
  }
  set [g(317)](t) {
    this._rotation !== t && (this._matrixDirty = !0), this._rotation = t;
  }
  get scaleX() {
    return this[g(353)];
  }
  set scaleX(t) {
    t == 0 && (t = 1e-6), this._scaleX !== t && (this._matrixDirty = !0), this._scaleX = t;
  }
  get scaleY() {
    return this[g(335)];
  }
  set scaleY(t) {
    const e = g;
    t == 0 && (t = 1e-6), this._scaleY !== t && (this[e(286)] = !0), this[e(335)] = t;
  }
  get skewX() {
    return this._skewX;
  }
  set skewX(t) {
    const e = g;
    this[e(309)] !== t && (this._matrixDirty = !0), this[e(309)] = t;
  }
  get skewY() {
    return this._skewY;
  }
  set skewY(t) {
    this[g(358)] !== t && (this._matrixDirty = !0), this._skewY = t;
  }
  get left() {
    return this.x - 0.5 * this.width;
  }
  set left(t) {
    this.x = t + 0.5 * this.width;
  }
  get right() {
    return this.x + 0.5 * this.width;
  }
  set right(t) {
    this.x = t - 0.5 * this.width;
  }
  get [g(293)]() {
    return this.y - 0.5 * this.height;
  }
  set top(t) {
    const e = g;
    this.y = t + 0.5 * this[e(390)];
  }
  get bottom() {
    return this.y + 0.5 * this.height;
  }
  set bottom(t) {
    const e = g;
    this.y = t - 0.5 * this[e(390)];
  }
  set [g(340)](t) {
    this._zIndex = t, this.setZIndex(t);
  }
  get zIndex() {
    return this._zIndex;
  }
  setZIndex(t) {
    const e = g;
    this._zIndex = t, this[e(387)] && this.parent[e(306)](), this[e(286)] = !0;
  }
  [g(306)]() {
    const t = g;
    return this[t(355)]((e, n) => e[t(340)] - n[t(340)]);
  }
  addChildren(t) {
    return this.append(...t);
  }
  [g(299)](t) {
    return this[g(332)](t);
  }
};
J([p("NE")], H[g(278)], "className", 2), J([p(!0)], H.prototype, "pointerEnabled", 2), J([p(!1)], H.prototype, "isLayer", 2), J([p(!0)], H.prototype, "serializeable", 2), J([p(0)], H.prototype, "_x", 2), J([p(0)], H[g(278)], "_y", 2), J([p(1)], H.prototype, "_width", 2), J([p(1)], H[g(278)], "_height", 2), J([p(0)], H.prototype, "_rotation", 2), J([p(1)], H[g(278)], g(353), 2), J([p(1)], H.prototype, "_scaleY", 2), J([p(0)], H.prototype, "_skewX", 2), J([p(0)], H[g(278)], g(358), 2), J([p(os.getShape("Rect"))], H[g(278)], "_shape", 2), J([p(1)], H[g(278)], "_pickPrecision", 2), J([p(["className"])], H.prototype, "_allwaysSerializers", 2), J([p(["id", "name", "type", "zIndex", "frozen", "selectedStyle", "showSelected", g(310), "visible", "origin", "classList", g(359), "data", "attributes", g(375), "title"])], H.prototype, "_serializers", 2), J([p(0)], H.prototype, g(291), 2), J([p(!1)], H.prototype, "frozen", 2), J([p(Q.MinDeep)], H[g(278)], "deep", 2), J([p(!0)], H[g(278)], g(300), 2), J([p(!0)], H[g(278)], g(310), 2), J([p(!1)], H.prototype, "isSelected", 2), J([p(!1)], H.prototype, "dropAllowed", 2);
let at = H;
function Aa(s) {
  const t = g;
  if (s == null)
    return () => !0;
  if (typeof s == "function")
    return s;
  let e, n, r, i = s, o = s[t(290)](/(.*)\s*(\[.*\])/);
  if (o && (i = o[1], r = o[2]), i[t(289)](".") ? n = (a) => a.classList.indexOf(i) != -1 : i[t(289)]("#") ? n = (a) => a.id == i.substring(1) : i != "" && (n = (a) => a[t(380)] == i), r != null && (e = r.match(/\[\s*(.*?)\s*([>|<|=|!]{1,2})\s*['"]{0,1}(.*?)['"]{0,1}]$/)) != null) {
    let a = e[1], h = e[2], l = e[3], c = (u) => "" + u[a] == l;
    return h == ">" ? c = (u) => u[a] > parseInt(l) : h == ">=" ? c = (u) => u[a] >= parseInt(l) : h == "<" ? c = (u) => u[a] < parseInt(l) : h == "<=" ? c = (u) => u[a] <= parseInt(l) : h == "!=" && (c = (u) => u[a] != l), n == null ? c : (u) => n(u) && c(u);
  }
  return () => !0;
}
const tt = Ve;
function Ui() {
  const s = ["asin", "abs", "tick", "finished", "pow", "running", "object", "alternate-reverse", "isPause", "markDirty", "playedTimes", "duration", "33657FIngIG", "72iLzNcu", "aeNodes", "76266JwKHST", "2Pxtebu", "12nUYGmF", "assign", "onEnd", "199730ASlizX", "direction", "setAttributes", "slice", "onUpdate", "timeline", "startTime", "2126411WtJCAG", "hasAENode", "system", "length", "296NggFmj", "now", "delayed", "210aGxaor", "anim", "add", "play", "continue", "none", "animations", "resolve", "336215OzrhqC", "promise", "5172ebvuwA", "catch", "sin", "from", "playState", "516286lEISvN", "135879iPlFdv"];
  return (Ui = function() {
    return s;
  })();
}
function Ve(s, t) {
  const e = Ui();
  return (Ve = function(n, r) {
    return e[n -= 449];
  })(s, t);
}
function Na(s, t, e, n) {
  return e - Dr(n - s, 0, e, n) + t;
}
function Dr(s, t, e, n) {
  return (s /= n) < 1 / 2.75 ? e * (7.5625 * s * s) + t : s < 2 / 2.75 ? e * (7.5625 * (s -= 1.5 / 2.75) * s + 0.75) + t : s < 2.5 / 2.75 ? e * (7.5625 * (s -= 2.25 / 2.75) * s + 0.9375) + t : e * (7.5625 * (s -= 2.625 / 2.75) * s + 0.984375) + t;
}
(function() {
  const s = Ve, t = Ui();
  for (; ; )
    try {
      if (parseInt(s(476)) / 1 * (-parseInt(s(494)) / 2) + -parseInt(s(477)) / 3 * (-parseInt(s(495)) / 4) + -parseInt(s(498)) / 5 * (-parseInt(s(491)) / 6) + parseInt(s(454)) / 7 + parseInt(s(458)) / 8 * (-parseInt(s(493)) / 9) + parseInt(s(461)) / 10 * (-parseInt(s(469)) / 11) + parseInt(s(471)) / 12 * (parseInt(s(490)) / 13) === 563174)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
let tl = { easeLinear: function(s, t, e, n) {
  return e * s / n + t;
}, easeInQuad: function(s, t, e, n) {
  return e * (s /= n) * s + t;
}, easeOutQuad: function(s, t, e, n) {
  return -e * (s /= n) * (s - 2) + t;
}, easeInOutQuad: function(s, t, e, n) {
  return (s /= n / 2) < 1 ? e / 2 * s * s + t : -e / 2 * (--s * (s - 2) - 1) + t;
}, easeInSine: function(s, t, e, n) {
  return -e * Math.cos(s / n * (Math.PI / 2)) + e + t;
}, easeOutSine: function(s, t, e, n) {
  return e * Math.sin(s / n * (Math.PI / 2)) + t;
}, easeInOutSine: function(s, t, e, n) {
  return -e / 2 * (Math.cos(Math.PI * s / n) - 1) + t;
}, easeInExpo: function(s, t, e, n) {
  return s == 0 ? t : e * Math.pow(2, 10 * (s / n - 1)) + t;
}, easeInOutExpo: function(s, t, e, n) {
  return s == 0 ? t : s == n ? t + e : (s /= n / 2) < 1 ? e / 2 * Math.pow(2, 10 * (s - 1)) + t : e / 2 * (2 - Math.pow(2, -10 * --s)) + t;
}, easeInCirc: function(s, t, e, n) {
  return -e * (Math.sqrt(1 - (s /= n) * s) - 1) + t;
}, easeOutCirc: function(s, t, e, n) {
  return e * Math.sqrt(1 - (s = s / n - 1) * s) + t;
}, easeInOutCirc: function(s, t, e, n) {
  return (s /= n / 2) < 1 ? -e / 2 * (Math.sqrt(1 - s * s) - 1) + t : e / 2 * (Math.sqrt(1 - (s -= 2) * s) + 1) + t;
}, easeInCubic: function(s, t, e, n) {
  return e * (s /= n) * s * s + t;
}, easeOutCubic: function(s, t, e, n) {
  return e * ((s = s / n - 1) * s * s + 1) + t;
}, easeInOutCubic: function(s, t, e, n) {
  return (s /= n / 2) < 1 ? e / 2 * s * s * s + t : e / 2 * ((s -= 2) * s * s + 2) + t;
}, easeInQuart: function(s, t, e, n) {
  return e * (s /= n) * s * s * s + t;
}, easeOutQuart: function(s, t, e, n) {
  return -e * ((s = s / n - 1) * s * s * s - 1) + t;
}, easeInOutQuart: function(s, t, e, n) {
  return (s /= n / 2) < 1 ? e / 2 * s * s * s * s + t : -e / 2 * ((s -= 2) * s * s * s - 2) + t;
}, easeInQuint: function(s, t, e, n) {
  return e * (s /= n) * s * s * s * s + t;
}, easeOutQuint: function(s, t, e, n) {
  return e * ((s = s / n - 1) * s * s * s * s + 1) + t;
}, easeInOutQuint: function(s, t, e, n) {
  return (s /= n / 2) < 1 ? e / 2 * s * s * s * s * s + t : e / 2 * ((s -= 2) * s * s * s * s + 2) + t;
}, easeInElastic: function(s, t, e, n) {
  const r = Ve;
  var i = 1.70158, o = 0, a = e;
  return s == 0 ? t : (s /= n) == 1 ? t + e : (o || (o = 0.3 * n), a < Math[r(479)](e) ? (a = e, i = o / 4) : i = o / (2 * Math.PI) * Math.asin(e / a), -a * Math[r(482)](2, 10 * (s -= 1)) * Math.sin((s * n - i) * (2 * Math.PI) / o) + t);
}, easeOutElastic: function(s, t, e, n) {
  const r = Ve;
  var i = 1.70158, o = 0, a = e;
  return s == 0 ? t : (s /= n) == 1 ? t + e : (o || (o = 0.3 * n), a < Math.abs(e) ? (a = e, i = o / 4) : i = o / (2 * Math.PI) * Math.asin(e / a), a * Math.pow(2, -10 * s) * Math[r(473)]((s * n - i) * (2 * Math.PI) / o) + e + t);
}, easeInOutElastic: function(s, t, e, n) {
  const r = Ve;
  var i = 1.70158, o = 0, a = e;
  return s == 0 ? t : (s /= n / 2) == 2 ? t + e : (o || (o = n * (0.3 * 1.5)), a < Math.abs(e) ? (a = e, i = o / 4) : i = o / (2 * Math.PI) * Math[r(478)](e / a), s < 1 ? a * Math[r(482)](2, 10 * (s -= 1)) * Math.sin((s * n - i) * (2 * Math.PI) / o) * -0.5 + t : a * Math.pow(2, -10 * (s -= 1)) * Math.sin((s * n - i) * (2 * Math.PI) / o) * 0.5 + e + t);
}, easeInBack: function(s, t, e, n, r) {
  return r == null && (r = 1.70158), e * (s /= n) * s * ((r + 1) * s - r) + t;
}, easeOutBack: function(s, t, e, n, r) {
  return r == null && (r = 1.70158), e * ((s = s / n - 1) * s * ((r + 1) * s + r) + 1) + t;
}, easeInOutBack: function(s, t, e, n, r) {
  return r == null && (r = 1.70158), (s /= n / 2) < 1 ? e / 2 * (s * s * ((1 + (r *= 1.525)) * s - r)) + t : e / 2 * ((s -= 2) * s * ((1 + (r *= 1.525)) * s + r) + 2) + t;
}, easeInBounce: Na, easeOutBounce: Dr, easeInOutBounce: function(s, t, e, n) {
  return s < n / 2 ? 0.5 * Na(2 * s, 0, e, n) + t : 0.5 * Dr(2 * s - n, 0, e, n) + 0.5 * e + t;
} };
class hh {
  constructor(t) {
    const e = Ve;
    this[e(489)] = 1e3, this.delay = 0, this.direction = "normal", this.fillMode = e(466), this[e(475)] = "idle", this.isPause = !1, this.finished = !1, this[e(460)] = !1, this.times = 1, this.playedTimes = 0, this.effect = "easeLinear", this[e(449)](t);
  }
  [tt(449)](t) {
    return Object[tt(496)](this, t), this;
  }
  [tt(451)](t) {
    return this.update = t, this;
  }
  cancel() {
    const t = tt;
    return this[t(456)] && this[t(456)].remove(this), this.reject && (this.reject(), this.reject = null), this.playState = t(481), this;
  }
  pause() {
    return this[tt(475)] = "paused", this.isPause = !0, this;
  }
  [tt(465)]() {
    const t = tt;
    return this.startTime = Date.now() - this.currentTime, this[t(475)] = t(483), this.isPause = !1, this;
  }
  [tt(480)](t) {
    const e = tt;
    if (this[e(475)] != "running")
      return !1;
    let n = t - this[e(453)];
    return this.currentTime = n, n >= this.duration ? (this.playState = e(481), this.stepAction(this.duration), this[e(484)] && this[e(484)].markDirty(), this[e(488)] < this.times ? this[e(464)]() : (this.resolve(), this[e(468)] = null, this.onEnd && this[e(497)]())) : (this.stepAction(n), this.object && this.object[e(487)]()), !0;
  }
  [tt(464)]() {
    const t = tt;
    let e = this;
    this.system.add(this), this.playedTimes++, this[t(486)] = !1, this.delay != 0 && this.delayed == 0 ? (setTimeout(function() {
      const o = t;
      e.startTime = Date[o(459)](), e.playState = "running";
    }, this.delay), e[t(460)] = !0) : (e.startTime = Date[t(459)](), e.playState = "running");
    const n = this;
    let r = this._getTickAction();
    this.stepAction = r;
    let i = this.promise;
    return i == null && (i = new Promise(function(o, a) {
      n.resolve == null && (n.resolve = o, n.reject = a);
    }), this.promise = this[t(470)]), i[t(472)]((o) => {
    });
  }
  _getTickAction() {
    const t = tt;
    let e = this.effect || "easeLinear", n = this[t(474)], r = this.to, i = this[t(489)], o = this.update, a = n, h = r;
    if (typeof n == "number" && (a = [n], h = [r]), this.direction == "reverse" || this[t(499)] == t(485)) {
      let v = a;
      a = h, h = v;
    }
    let l = a[0];
    const c = Array.isArray(n), u = typeof l == "number", d = l.x != null || l.y != null;
    let f, x = a[t(450)](), m = tl[e], I = this.direction == "alternate" || this.direction == t(485), y = this, S = 0.5 * this[t(489)];
    if (u)
      f = function(v) {
        let L = v;
        I && (L = v > S ? 2 * y.duration - 2 * L : 2 * v);
        for (let w = 0; w < a.length; w++) {
          const T = a[w], R = h[w] - T;
          if (R == 0)
            x[w] = T;
          else {
            let nt = m(L, T, R, i);
            x[w] = nt;
          }
        }
        o(c ? x : x[0]);
      };
    else {
      if (!d)
        throw new Error("value format error.");
      f = function(v) {
        const L = t;
        for (let w = 0; w < a[L(457)]; w++) {
          const T = a[w], R = h[w], nt = R.x - T.x, ve = R.y - T.y;
          let kt = { x: T.x, y: T.y };
          nt != 0 && (kt.x = m(v, T.x, nt, i)), ve != 0 && (kt.y = m(v, T.y, ve, i)), x[w] = kt;
        }
        o(c ? x : x[0]);
      };
    }
    return f;
  }
}
class el {
  constructor() {
    const t = tt;
    this.animations = /* @__PURE__ */ new Set(), this.aeNodes = /* @__PURE__ */ new WeakSet(), this[t(452)] = { begin: 17645184e5, end: Date.now() };
  }
  [tt(455)](t) {
    return this.aeNodes.has(t);
  }
  addAENode(t) {
    const e = tt;
    !this.hasAENode(t) && t.setupAE(), t.animationSystem = this, t[e(467)].forEach((n, r) => {
      n.object = t, n.system = this, n.play();
    }), this[e(492)].add(t);
  }
  removeAENode(t) {
    t.animationSystem = null, t.animations.forEach((e, n) => {
      e.cancel();
    }), this.aeNodes.delete(t);
  }
  [tt(463)](t) {
    const e = tt;
    t.system = this, this[e(467)][e(463)](t);
  }
  remove(t) {
    this[tt(467)].delete(t);
  }
  cancelAll() {
    const t = tt;
    for (let e of this[t(467)].values())
      e.cancel();
    this.animations.clear();
  }
  tick(t) {
    const e = tt;
    let n = !1;
    return this[e(467)].forEach((r) => {
      const i = e;
      r.tick(t) && n == 0 && (n = !0), r[i(475)] == i(481) && this.animations.delete(r);
    }), n;
  }
  anime(t) {
    return this.anim(t);
  }
  [tt(462)](t) {
    t.duration == null && (t.duration = 1e3);
    let e = new hh();
    return e.system = this, e.setAttributes(t), e;
  }
}
const nl = qi;
function Gi() {
  const s = ["72464ktwfiW", "6dWVMxs", "1889160EdvWYq", "1576235OzfQJx", "10795376QosmKW", "2267187aZARml", "464693bsBffi", "595080tdNGuk", "get"];
  return (Gi = function() {
    return s;
  })();
}
(function() {
  const s = qi, t = Gi();
  for (; ; )
    try {
      if (-parseInt(s(305)) / 1 + parseInt(s(306)) / 2 + -parseInt(s(304)) / 3 + parseInt(s(308)) / 4 + parseInt(s(311)) / 5 * (parseInt(s(309)) / 6) + -parseInt(s(310)) / 7 + parseInt(s(312)) / 8 === 490023)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Vi = /* @__PURE__ */ new Map([["lt", { x: -1, y: -1 }], ["ct", { x: 0, y: -1 }], ["rt", { x: 1, y: -1 }], ["lm", { x: -1, y: 0 }], ["center", { x: 0, y: 0 }], ["rm", { x: 1, y: 0 }], ["lb", { x: -1, y: 1 }], ["cb", { x: 0, y: 1 }], ["rb", { x: 1, y: 1 }]]), sl = /* @__PURE__ */ new Map();
function qi(s, t) {
  const e = Gi();
  return (qi = function(n, r) {
    return e[n -= 304];
  })(s, t);
}
const rl = Vi.keys();
for (let s of rl) {
  let t = Vi[nl(307)](s), e = j.normalize([], [t.x, t.y]);
  sl.set(s, e);
}
const X = as;
(function() {
  const s = as, t = Ki();
  for (; ; )
    try {
      if (-parseInt(s(306)) / 1 * (-parseInt(s(319)) / 2) + -parseInt(s(298)) / 3 + -parseInt(s(322)) / 4 + parseInt(s(308)) / 5 * (-parseInt(s(334)) / 6) + parseInt(s(315)) / 7 * (parseInt(s(333)) / 8) + -parseInt(s(317)) / 9 + parseInt(s(309)) / 10 * (parseInt(s(332)) / 11) === 746446)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var il = Object.defineProperty, ol = Object.getOwnPropertyDescriptor, yn = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? ol(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && il(t, e, i), i;
};
const Ar = class lh extends $e {
  constructor() {
    const t = as;
    super(), this.isClosed = !1, this.anchors = lh[t(326)];
  }
  [X(316)](t, e) {
    const n = X;
    let r = e.getPoints();
    if (r.length == 0)
      return;
    let i = r[0];
    t[n(304)](), t.moveTo(i.x, i.y);
    for (let a = 1; a < r.length - 1; a++)
      (r[a].x !== i.x || r[a].y !== i.y) && t[n(302)](r[a].x, r[a].y), i = r[a];
    let o = r[r.length - 1];
    t.lineTo(o.x, o.y), t[n(301)]();
  }
};
function Ki() {
  const s = ["filter", "4217480vVDAGn", "prototype", "dist", "_measureDistance", "DefaultAnchors", "arc", "anchors", "className", "length", "LineShape", "2981SJcGLK", "8aLTJDY", "6anPDDV", "1617792akxrCa", "ArcShape", "getIntersect", "stroke", "lineTo", "bezierCurveTo", "beginPath", "isClosed", "1dpHzDp", "push", "3079280aAMZaD", "101950ICAZxi", "min", "AutoFoldShape", "worldToLocalXY", "_calcQuadBezierExtrema", "object", "2817521eGTxef", "draw", "9107703zujbQf", "getPoints", "1605110NpDzJT", "_getCubicBezierExtremas"];
  return (Ki = function() {
    return s;
  })();
}
Ar.DefaultAnchors = /* @__PURE__ */ new Map(), yn([p(X(331))], Ar[X(323)], X(329), 2);
let wn = Ar;
const Nr = class ch extends wn {
  constructor() {
    super(), this.anchors = ch.DefaultAnchors;
  }
};
Nr[X(326)] = /* @__PURE__ */ new Map(), yn([p(X(311))], Nr.prototype, "className", 2);
let uh = Nr;
const Mr = class An extends wn {
  constructor() {
    const t = X;
    super(), this[t(328)] = An.DefaultAnchors, this.isClosed = !1;
  }
  draw(t, e) {
    const n = X;
    let r = e.getPoints();
    if (r.length == 0)
      return;
    let i = r[0], o = r[1], a = r[2];
    t[n(304)](), t.moveTo(i.x, i.y), t.quadraticCurveTo(o.x, o.y, a.x, a.y), this[n(305)] && t.closePath(), t.stroke();
  }
  [X(300)](t, e, n) {
    const r = X;
    let i = n.worldToLocalXY(t, e), o = n.getPoints(), a = o[0], h = o[1], l = o[2], c = An._measureDistance(i.x, i.y, a.x, a.y, h.x, h.y, l.x, l.y), u = n.getPoint(c.t), d = new Qe(u.x, u.y);
    return d[r(314)] = n, d.dist = c.dist, d.t = c.t, d.segIndex = 0, d;
  }
  static _measureDistance(t, e, n, r, i, o, a, h) {
    const l = X;
    function c(m) {
      const I = Is(m, n, i, a), y = Is(m, r, o, h), S = Ma(m, n, i, a), v = Ma(m, r, o, h);
      return (I - t) * S + (y - e) * v;
    }
    function u(m) {
      return (c(m + 1e-5) - c(m)) / 1e-5;
    }
    const d = [0, 0.5, 1].map((m) => Pi(c, u, m))[l(321)]((m) => m >= 0 && m <= 1);
    let f = 1 / 0, x = 0;
    return d.forEach((m) => {
      const I = hn(Is(m, n, i, a), Is(m, r, o, h), t, e);
      I < f && (f = I, x = m);
    }), hn(n, r, t, e) < f && (f = hn(n, r, t, e), x = 0), hn(a, h, t, e) < f && (f = hn(a, h, t, e), x = 1), { dist: f, t: x };
  }
  static _calcQuadBezierExtrema(t, e, n) {
    let r = t - 2 * e + n;
    return r === 0 ? null : (t - e) / r;
  }
  static _getQuadBezierExtremas(t, e, n) {
    const r = X, i = t.x, o = t.y, a = e.x, h = e.y, l = n.x, c = n.y, u = [];
    let d = An._calcQuadBezierExtrema(i, a, l);
    return d != null && d > 0 && d < 1 && u[r(307)](d), d = An[r(313)](o, h, c), d != null && d > 0 && d < 1 && u[r(307)](d), u;
  }
};
Mr.DefaultAnchors = /* @__PURE__ */ new Map(), yn([p("QuadraticCurveShape")], Mr[X(323)], "className", 2);
let js = Mr;
const Os = class zr extends wn {
  constructor() {
    super(), this.anchors = zr.DefaultAnchors;
  }
  draw(t, e) {
    const n = X;
    let r = e.getPoints();
    if (r.length == 0)
      return;
    let i = r[0], o = r[1], a = r[3], h = r[4];
    t.beginPath(), t.moveTo(i.x, i.y), t[n(303)](o.x, o.y, a.x, a.y, h.x, h.y), this.isClosed && t.closePath(), t[n(301)]();
  }
  getIntersect(t, e, n) {
    const r = X;
    n.worldToLocalXY(t, e);
    let i = n[r(318)](), o = i[0], a = i[1], h = i[3], l = i[4], c = zr[r(325)](t, e, o.x, o.y, a.x, a.y, h.x, h.y, l.x, l.y), u = n.getPoint(c.t), d = new Qe(u.x, u.y);
    return d.object = n, d[r(324)] = c.dist, d.t = c.t, d.segIndex = 0, d;
  }
  static _measureDistance(t, e, n, r, i, o, a, h, l, c) {
    const u = X;
    function d(w, T, R, nt, ve) {
      const kt = 1 - w;
      return kt * kt * kt * T + 3 * kt * kt * w * R + 3 * kt * w * w * nt + w * w * w * ve;
    }
    function f(w, T, R, nt, ve) {
      const kt = 1 - w;
      return 3 * kt * kt * (R - T) + 6 * kt * w * (nt - R) + 3 * w * w * (ve - nt);
    }
    function x(w, T, R, nt) {
      return (w - R) * (w - R) + (T - nt) * (nt - nt);
    }
    function m(w) {
      const T = d(w, n, i, a, l), R = d(w, r, o, h, c);
      return (T - t) * f(w, n, i, a, l) + (R - e) * f(w, r, o, h, c);
    }
    function I(w) {
      const T = f(w, n, i, a, l), R = f(w, r, o, h, c);
      return T * T + R * R + m(w);
    }
    const y = [0, 0.25, 0.5, 0.75, 1].map((w) => Pi(m, I, w)).filter((w) => w >= 0 && w <= 1);
    let S = 1 / 0, v = 0;
    const L = y.map((w) => {
      const T = d(w, n, i, a, l), R = d(w, r, o, h, c), nt = Math.sqrt(x(T, R, t, e));
      return nt < S && (S = nt, v = w), nt;
    });
    return L.push(Math.sqrt(x(n, r, t, e)), Math.sqrt(x(l, c, t, e))), { dist: Math[u(310)](...L), t: v };
  }
  static [X(320)](t, e, n, r) {
    const i = t.x, o = t.y, a = e.x, h = e.y, l = n.x, c = n.y, u = r.x, d = r.y, f = [], x = (m, I, y) => {
      const S = as;
      if (m === 0)
        return;
      const v = I * I - 4 * m * y;
      if (v >= 0) {
        const L = Math.sqrt(v), w = (-I + L) / (2 * m), T = (-I - L) / (2 * m);
        w > 0 && w < 1 && f.push(w), T > 0 && T < 1 && f[S(307)](T);
      }
    };
    return x(3 * (u - 3 * l + 3 * a - i), 6 * (l - 2 * a + i), 3 * (a - i)), x(3 * (d - 3 * c + 3 * h - o), 6 * (c - 2 * h + o), 3 * (h - o)), f;
  }
};
Os[X(326)] = /* @__PURE__ */ new Map(), yn([p("BezierCurveShape")], Os.prototype, X(329), 2), yn([p(!1)], Os.prototype, X(305), 2);
let Bs = Os;
function as(s, t) {
  const e = Ki();
  return (as = function(n, r) {
    return e[n -= 298];
  })(s, t);
}
class ph extends wn {
  constructor() {
    const t = X;
    super(), this[t(305)] = !1;
  }
  draw(t, e) {
    const n = X;
    let r = e.getPoints();
    if (r[n(330)] == 0)
      return;
    let i = r[0], o = r[r.length - 1], a = 0.5 * A.distance(i.x, i.y, o.x, o.y), h = 0.5 * (i.x + o.x), l = 0.5 * (i.y + o.y);
    if (t.beginPath(), e && e.direction == Bt.anticlockwise) {
      let c = Math.atan2(i.y - o.y, i.x - o.x);
      t.arc(h, l, a, c, c + Math.PI, !0);
    } else {
      let c = Math.atan2(i.y - o.y, i.x - o.x);
      t[n(327)](h, l, a, c, c + Math.PI, !1);
    }
    this.isClosed && t.closePath(), t[n(301)]();
  }
  getIntersect(t, e, n) {
    const r = X;
    let i = n[r(312)](t, e), o = n[r(318)](), a = o[0], h = o[o[r(330)] - 1], l = n._measureDistance(a, h, i), c = n.getPoint(l.t), u = new Qe(c.x, c.y);
    return u.object = n, u.dist = l.dist, u.t = l.t, u.segIndex = 0, u;
  }
}
function Is(s, t, e, n) {
  const r = 1 - s;
  return r * r * t + 2 * r * s * e + s * s * n;
}
function Ma(s, t, e, n) {
  return 2 * (1 - s) * (e - t) + 2 * s * (n - e);
}
yn([p(X(299))], ph.prototype, "className", 2);
const tn = Vs;
function Vs(s, t) {
  const e = Zi();
  return (Vs = function(n, r) {
    return e[n -= 152];
  })(s, t);
}
(function() {
  const s = Vs, t = Zi();
  for (; ; )
    try {
      if (parseInt(s(157)) / 1 + -parseInt(s(159)) / 2 + parseInt(s(166)) / 3 * (parseInt(s(160)) / 4) + -parseInt(s(161)) / 5 + -parseInt(s(163)) / 6 * (parseInt(s(155)) / 7) + -parseInt(s(153)) / 8 + parseInt(s(158)) / 9 === 722304)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class al {
  constructor() {
    this.anchorProxyList = [];
  }
  toJSON(t, e) {
    let n = e.getPoints();
    return this.anchorProxyList.map((r, i) => {
      const o = Vs;
      if (r[o(164)] instanceof B) {
        let h = r.anchor, l = N.getOnLinkPoint(e, r);
        h.remember(l);
      }
      let a = r.toJSON(t);
      if (a.hasOwnProperty("target") && a.target == null) {
        console[o(156)]("LinkPath.json.target == null");
        let h = n[0];
        return e[o(152)] == "PathLink" ? h = n[i] : i > 0 && (h = n[n.length - 1]), { className: ut[o(162)].className, x: h.x, y: h.y };
      }
      return a;
    });
  }
  set(t) {
    this.anchorProxyList.length = 0;
    for (let e = 0; e < t.length; e++)
      this.anchorProxyList.push(t[e]);
  }
  setBegin(t) {
    this.anchorProxyList[0] = t;
  }
  [tn(167)](t) {
    const e = tn;
    if (this.anchorProxyList.length < 2)
      return void (this[e(154)][1] = t);
    let n = this.anchorProxyList[e(168)] - 1;
    this.anchorProxyList[n] = t;
  }
  getLength() {
    return this[tn(154)].length;
  }
  getBegin() {
    return this[tn(154)][0];
  }
  [tn(165)]() {
    const t = tn;
    let e = this.anchorProxyList.length - 1;
    return this[t(154)][e];
  }
}
function Zi() {
  const s = ["length", "className", "1271208XsdCop", "anchorProxyList", "33691ZhyNLg", "warn", "481773TLCIoR", "5069970gIJbVx", "1886940GIqRCC", "5774236WNPxCA", "3151480CokYYp", "prototype", "42TyleUP", "host", "getEnd", "3FbJEXc", "setEnd"];
  return (Zi = function() {
    return s;
  })();
}
const b = qs;
function qs(s, t) {
  const e = Qi();
  return (qs = function(n, r) {
    return e[n -= 454];
  })(s, t);
}
(function() {
  const s = qs, t = Qi();
  for (; ; )
    try {
      if (-parseInt(s(525)) / 1 + parseInt(s(481)) / 2 + -parseInt(s(482)) / 3 * (parseInt(s(497)) / 4) + -parseInt(s(508)) / 5 + parseInt(s(501)) / 6 + -parseInt(s(466)) / 7 * (parseInt(s(479)) / 8) + parseInt(s(494)) / 9 === 900539)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var hl = Object[b(464)], ll = Object.getOwnPropertyDescriptor, Se = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? ll(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && hl(t, e, i), i;
};
function Qi() {
  const s = ["_getBeginVec", "draggable", "hitTest", "normalize", "parent", "_drawContentDesc", "10379223ySGNXZ", "_invertWorldTransform", "center", "1033652qnxqzs", "addInLink", "fold2Offset", "rotate", "9378648TdIdZP", "_getLocalTransform", "getPoints", "ctrlPoint2", "clone", "worldToLocalXY", "lineWidth", "3185100qIaXYD", "length", "anchorProxyList", "beginArrow", "localToWorldXY", "_getEndVec", "Link", "isLikePoint", "addOutLink", "objIndexMap", "setBeginArrow", "end", "begin", "getAnchor", "removeChild", "_beginOffset", "ctrlPoint1", "593553jcnXfo", "host", "toJSON", "getBegin", "prototype", "_middleIndex", "getConnectAutoPoint", "hasHost", "children", "getOnLinkPoint", "applyTo", "get", "getInLinks", "path", "_shape", "label", "setOriginOnLink", "getEndPoint", "removeOutLink", "_matrixDirty", "defineProperty", "scale", "137263QOELfM", "getBeginArrow", "_offsetAndArrowHandle", "endArrow", "_updatePoints", "beginOffset", "arrow must be Node", "destroy", "points", "_endOffset", "getSegmentAnchor", "deep", "endOffset", "8VAeDps", "borderWidth", "1452862xjTylE", "15ZDulaU", "_isTextBlank", "text", "setBegin", "max", "origin"];
  return (Qi = function() {
    return s;
  })();
}
class B extends at {
  constructor(t, e, n, r, i) {
    const o = b;
    if (super(), this._state = { _needPaint: !0, _isOutOfViewport: !1, _attrDirty: !0, points: [], az: [] }, this._drawContentDesc = { hasBorder: !1, hasBackgroundColor: !1 }, this[o(484)] = t, this[o(495)] = wt.allocate(), this.path = new al(), e == null) {
      const a = new ut(0, 0);
      this.path.anchorProxyList.push(new N(a));
    } else
      this.setBegin(e, r);
    if (n == null) {
      const a = new ut(0, 0);
      this.path[o(510)].push(new N(a));
    } else
      this.setEnd(n, i);
    this._obb.aabb = new E(0, 0, 1, 1);
  }
  get begin() {
    return this.path.getBegin();
  }
  get end() {
    return this.path.getEnd();
  }
  get [b(471)]() {
    return this[b(523)];
  }
  set [b(471)](t) {
    this[b(523)] = t, this._matrixDirty = !0;
  }
  get [b(478)]() {
    return this[b(475)];
  }
  set endOffset(t) {
    const e = b;
    this._endOffset = t, this[e(463)] = !0;
  }
  [b(476)](t, e) {
    return new N(new Gt(null, t, e), this);
  }
  getAnchor(t) {
    let e = this._shape.getConnectionAnchor(t);
    if (e == null)
      throw new Error("anchor not found:" + t);
    return new N(e, this);
  }
  getSegmentCount() {
    return 1;
  }
  getRect() {
    let t = this._getTotalLineWidth();
    return pe.toAABB(new E(), this._obb.localPoints, t);
  }
  get text() {
    const t = b;
    return this[t(459)] != null ? this[t(459)].text : this._text;
  }
  set [b(484)](t) {
    this.setLabel(t), this._text = t;
  }
  setLabel(t) {
    return t == null && this[b(459)] == null ? this : t instanceof C ? (za(this, t), t.pointerEnabled = !1, t) : this.label != null && typeof t == "string" ? (this.label.text = t, this) : (function(e, n) {
      const r = b;
      if (e.label == null) {
        const i = new qe(n);
        return i[r(489)] = !1, i.pointerEnabled = !1, i.autoSize = !0, i[r(460)](0.5), i.setOriginPosition("cb"), za(e, i), i;
      }
      e[r(459)].text = n, e[r(459)];
    }(this, t), this);
  }
  getLabel() {
    return this.label;
  }
  [b(467)]() {
    return this.beginArrow;
  }
  [b(518)](t) {
    const e = b;
    if (!(t instanceof C))
      throw new Error(e(472));
    let n = this;
    return n[e(511)] != null && n.removeChild(n[e(511)]), n.children.indexOf(t) == -1 && n.addChild(t), t.draggable = !1, n.beginArrow = t, this._matrixDirty = !0, this;
  }
  getEndArrow() {
    return this[b(469)];
  }
  setEndArrow(t) {
    const e = b;
    if (!(t instanceof C))
      throw new Error("arrow must be Node");
    let n = this;
    return n.endArrow != null && n.removeChild(n[e(469)]), n.children.indexOf(t) == -1 && n.addChild(t), t[e(489)] = !1, n[e(469)] = t, this[e(463)] = !0, this;
  }
  _getOBBPoints() {
    return this.points = this._updatePoints(), this.points;
  }
  [b(485)](t, e) {
    const n = b;
    this._matrixDirty = !0, this[n(520)] && this.begin.isDisplayObjectHost() && this[n(520)][n(526)].removeOutLink(this);
    let r = t instanceof N ? t : jr(t, e);
    this.path.setBegin(r), r.host instanceof at && r.host[n(516)](this);
  }
  setEnd(t, e) {
    const n = b;
    this._matrixDirty = !0, this.end && this.end.isDisplayObjectHost() && this.end[n(526)].removeInLink(this);
    let r = t instanceof N ? t : jr(t, e);
    this.path.setEnd(r), r.host instanceof at && r[n(526)][n(498)](this);
  }
  getBeginPoint() {
    return this.points == null && (this.points = this._updatePoints()), this.points[0];
  }
  [b(461)]() {
    return this[b(474)] == null && (this.points = this._updatePoints()), this.points[this.points.length - 1];
  }
  _getTotalLineWidth() {
    const t = this._drawContentDesc, e = this._computedStyle;
    let n = 0.5 * (e.lineWidth || 0);
    return n += e.padding || 0, t.hasBorder && (n += e.borderWidth), n;
  }
  draw(t) {
    const e = b;
    return this.begin == null || this[e(519)] == null || (this._computedStyle[e(454)](t), this._shape.draw(t, this)), this;
  }
  _afterStyleComputed() {
    const t = b, e = this._computedStyle, n = this[t(493)];
    n.hasBackgroundColor = e.backgroundColor != null, n.hasBorder = e[t(480)] > 0;
  }
  translateWith(t, e) {
    const n = b;
    let r = this.path[n(510)];
    for (let i = 0; i < r.length; i++) {
      let o = r[i], a = o.anchor;
      o.host == null && a instanceof ut && (a.x += t, a.y += e, this._matrixDirty = !0);
    }
    return this;
  }
  _calcAZ() {
    const t = b;
    let e = N[t(534)](this, this.begin), n = N.getOnLinkPoint(this, this[t(519)]), r = this._state.az;
    return r[0] = e, r[1] = n, r;
  }
  _notUpdateYet() {
    console.warn("not yet"), this.points = this._updatePoints();
  }
  _afterUpdateMatrix() {
    this[b(468)]();
  }
  [b(468)]() {
    const t = b;
    if (this[t(511)] && this.beginArrow.parent !== this && (this.beginArrow = null), this.endArrow && this.endArrow.parent !== this && (this.endArrow = null), !this._needCalcOffset())
      return;
    let e = { x: this.points[0].x, y: this.points[0].y }, n = { x: this.points[this.points[t(509)] - 1].x, y: this.points[this[t(474)][t(509)] - 1].y };
    ja(e, this.beginArrow, this[t(488)](), this.beginOffset || 0), ja(n, this.endArrow, this._getEndVec(), this.endOffset || 0);
    let r = this.points;
    r[0] = e, r[r.length - 1] = n;
  }
  [b(470)]() {
    const t = b;
    let e = this._state.points;
    e[t(509)] = 0;
    const n = this.path.anchorProxyList;
    for (let r = 0; r < n[t(509)]; r++) {
      let i = n[r], o = N.getOnLinkPoint(this, i);
      e[r] = o;
    }
    return e;
  }
  [b(503)]() {
    return this[b(474)] == null && (this.points = this._updatePoints()), this.points;
  }
  addChild(t) {
    return t[b(487)] == null && (t.origin = [0, 0]), super.addChild(t);
  }
  [b(502)]() {
    return this._localTransform;
  }
  _doTransform() {
  }
  [b(531)](t) {
    let e = this._shape.getIntersect(t.x, t.y, this);
    return { x: e.x, y: e.y };
  }
  _getAABBWithText() {
    const t = b;
    let e = this.getAABB(), n = this.getLabel();
    if (n != null && !n[t(483)]()) {
      let r = n._getAABBWithText();
      !r.isEmpty() && (e = E.union(e[t(505)](), r));
    }
    return e;
  }
  _upgradeParent() {
    const t = b;
    let e = this[t(520)].host, n = this.end.host;
    if (e == null || n == null)
      return null;
    let r = Es(e, n);
    return this[t(492)] === r ? null : (this.changeParent(r), r);
  }
  _needCalcOffset() {
    const t = b;
    return this.beginOffset != 0 || this.endOffset != 0 || this.beginArrow != null || this[t(469)] != null;
  }
  [b(488)]() {
    const t = b;
    let e = this.getPoint(1e-5), n = this[t(474)][0], r = [n.x - e.x, n.y - e.y];
    return j.normalize(r, r);
  }
  [b(513)]() {
    const t = b;
    let e = this.getPoint(0.9999999), n = this.points[this.points.length - 1], r = [n.x - e.x, n.y - e.y];
    return j[t(491)](r, r);
  }
  _isAlone() {
    return !this.begin.isDisplayObjectHost() && !this.end.isDisplayObjectHost();
  }
  unlinkBegin() {
    const t = b;
    this.begin.isDisplayObjectHost() && this.begin.host[t(462)](this), this.setBegin(this.getBeginPoint());
  }
  unlinkEnd() {
    this.end.isDisplayObjectHost() && this.end.host.removeInLink(this), this.setEnd(this.getEndPoint());
  }
  unlink() {
    this.unlinkBegin(), this.unlinkEnd(), this._matrixDirty = !0;
  }
  removeFromParent() {
    return this.unlink(), super.removeFromParent(), this;
  }
  changeParent(t) {
    const e = b;
    if (this.parent === t)
      throw new Error("same parent, dont need change");
    let n = this, r = this;
    function i(o, a, h) {
      const l = qs;
      let c = o[a];
      c != null && (c = o.localToWorldXY(c.x, c.y), o[a] = h[l(506)](c.x, c.y));
    }
    if (r.begin instanceof ut && !r[e(520)][e(532)]()) {
      let o = r[e(512)](r.begin.x, r[e(520)].y), a = t.worldToLocalXY(o.x, o.y);
      r[e(485)](a);
    }
    if (r.end instanceof ut && !r[e(519)][e(532)]()) {
      let o = r.localToWorldXY(r.end.x, r.end.y), a = t.worldToLocalXY(o.x, o.y);
      r.setEnd(a);
    }
    return r.className == Dt.QuadBezierLink ? i(r, Z.ctrlPoint, t) : r.className == Dt.BezierLink ? (i(r, Z[e(524)], t), i(r, Z[e(504)], t)) : r.className == Dt.AutoFoldLink && (i(r, Dt.fold1Offset, t), i(r, Dt[e(499)], t), i(r, Dt.centerOffset, t)), n.parent && n.parent.removeChild(n), t.addChild(n), this;
  }
  _positionToLocalPoint(t, e, n) {
    let r = this._shape.getConnectionAnchor(t);
    if (r == null)
      throw Error("position not exist:" + t);
    return N.calcPointByAnchor(this, r);
  }
  _toJSON(t) {
    const e = b;
    let n = super._toJSON(t);
    if (t != null) {
      let r = t[e(517)];
      n.path = this.path[e(527)](r, this), this.label != null && (n.label = r.get(this.label)), this.beginArrow != null && (n[e(511)] = r[e(455)](this[e(511)])), this.endArrow != null && (n.endArrow = r.get(this.endArrow));
    }
    return n;
  }
  _afterJson(t, e) {
    const n = b;
    if (t.label != null) {
      let i = e[n(455)](t[n(459)]);
      this[n(459)] = i;
    }
    if (t.beginArrow != null) {
      let i = e.get(t[n(511)]);
      this.setBeginArrow(i);
    }
    if (t[n(469)] != null) {
      let i = e.get(t[n(469)]);
      this.setEndArrow(i);
    }
    let r = t[n(457)].map((i) => N.fromJSON(i, e));
    this._setProxies(r);
  }
  _setProxies(t) {
    const e = b;
    this.path.set(t);
    let n = this.path[e(528)]();
    n.isDisplayObjectHost() && n.host.addOutLink(this), n = this.path.getEnd(), n.isDisplayObjectHost() && n[e(526)].addInLink(this);
    for (let r = 1; r < t.length - 1; r++)
      n = t[r], n.isDisplayObjectHost() && n.host[e(498)](this);
  }
  hitTest(t, e) {
    const n = b;
    if (this._preHitTest(t, e))
      return !0;
    let r = this._getAABBWithText(), i = this.getComputedStyle()[n(507)] || 0, o = Math[n(486)](0.5 * i, this._pickPrecision);
    if (!r.contains(t, e, o))
      return !1;
    let a = this._obb[n(474)], h = Yt.getNearestPointOnLines(t, e, a);
    return h.dist != null && h.dist < o;
  }
  _preHitTest(t, e) {
    const n = b;
    return this.endArrow != null && this[n(469)][n(490)](t, e) == 1 || this.beginArrow != null && this.beginArrow.hitTest(t, e) == 1 || this.label != null && this.label.hitTest(t, e) == 1;
  }
  [b(456)]() {
    return this.inLinks;
  }
  getOutLinks() {
    return this.outLinks;
  }
  [b(473)]() {
    const t = b;
    super[t(473)](), this.unlinkBegin(), this.unlinkEnd(), this.beginArrow = null, this[t(469)] = null, this[t(459)] = null, this._shape = null, this.points = null;
  }
}
function za(s, t) {
  const e = b;
  return s[e(459)] != null && s[e(522)](s.label), s.label = t, s[e(533)].indexOf(s.label) == -1 && s.addChild(s.label), t[e(460)](0.5), t;
}
function Es(s, t) {
  const e = b;
  return s[e(492)] === t.parent ? s.parent : s.deep == t[e(477)] ? Es(s.parent, t.parent) : s.deep > t.deep ? Es(s.parent, t) : Es(s, t.parent);
}
function ja(s, t, e, n) {
  const r = b;
  let i = t ? t.width : 0;
  if (n != 0 || i != 0) {
    let o = j[r(465)]([], e, -n - i);
    s.x += o[0], s.y += o[1];
  }
  if (i > 0) {
    let o = j[r(465)]([], e, 0.5 * i);
    t.setXY(s.x + o[0], s.y + o[1]), t[r(500)](Math.atan2(e[1], e[0]));
  }
}
function jr(s, t) {
  const e = b;
  if (s instanceof vt)
    return new N(s);
  if (s instanceof C)
    return s[e(521)](t || e(496));
  if (s instanceof B)
    return s.getAnchor(t || "center");
  if (A[e(515)](s)) {
    let n = s;
    return new N(new ut(n.x, n.y));
  }
  throw console.warn("unknow linkTarget type:", s), new Error("unknow linkTarget type");
}
Se([p(b(514))], B[b(529)], "className", 2), Se([p([0, 0.5])], B[b(529)], b(530), 2), Se([p(3)], B.prototype, "_pickPrecision", 2), Se([p(new wn())], B[b(529)], b(458), 2), Se([p(Rs.Link)], B.prototype, "_zIndex", 2), Se([p(!0)], B.prototype, "isLink", 2), Se([p(["className", "isLink"])], B[b(529)], "_allwaysSerializers", 2), Se([p(at.prototype._serializers.concat([b(471), "endOffset"]))], B.prototype, "_serializers", 2);
const yt = Ks;
function $i() {
  const s = ["aabb", "newInstance", "1795801cKqbRw", "69kWlDbU", "9IXjBDP", "center", "方位坐标不能用于Link", "toLinkLocalPoint", "equals", "getConnectAutoPoint", "1247052SVakyd", "_invertWorldTransform", "point", "318008IZAzjX", "anchor", "101418JoyduK", "unknow anchor type:", "_obb", "_positionToLocalPoint", "isNodeHost", "name", "24094230RqcNsE", "end", "getFunction", "isDisplayObjectHost", "465HbiYwd", "getPointOnLinkHost", "215221ZxmdQw", "unknow host or anchor:", "getOnLinkPoint", "toPoint", "329668LDMSVc", "host", "width"];
  return ($i = function() {
    return s;
  })();
}
function Ks(s, t) {
  const e = $i();
  return (Ks = function(n, r) {
    return e[n -= 413];
  })(s, t);
}
(function() {
  const s = Ks, t = $i();
  for (; ; )
    try {
      if (-parseInt(s(427)) / 1 + -parseInt(s(444)) / 2 + -parseInt(s(437)) / 3 * (parseInt(s(431)) / 4) + -parseInt(s(425)) / 5 * (-parseInt(s(415)) / 6) + -parseInt(s(436)) / 7 + parseInt(s(413)) / 8 * (-parseInt(s(438)) / 9) + parseInt(s(421)) / 10 === 950770)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class N {
  constructor(t, e) {
    const n = Ks;
    this.anchor = t, this[n(432)] = e;
  }
  [yt(424)]() {
    return this[yt(432)] instanceof at;
  }
  [yt(430)]() {
    return N.calcPointByAnchor(this.host, this.anchor);
  }
  hasHost() {
    return this.host != null;
  }
  [yt(419)]() {
    return this.host instanceof C;
  }
  [yt(442)](t) {
    const e = yt;
    return this.anchor === t[e(414)] && this.host === t.host;
  }
  static calcPointByAnchor(t, e) {
    const n = yt;
    if (t instanceof C)
      return N.getPointOnNodeHost(t, e);
    if (t instanceof B)
      return N[n(426)](t, e);
    if (t == null && e instanceof ut)
      return { x: e.x, y: e.y };
    throw console.error(n(428), t, e), new Error("unknow host or anchor");
  }
  static getPointOnNodeHost(t, e) {
    const n = yt;
    if (e instanceof Ae) {
      let r = t._drawContentDesc.shapeSize;
      return { x: e.x * r[n(433)] * 0.5, y: e.y * r.height * 0.5 };
    }
    if (e instanceof bt)
      return t[n(418)](e[n(420)]);
    if (e instanceof ut)
      return t.getWorldTransform().pointXY(e.x, e.y);
    if (e instanceof Gt)
      return t.getLocalPoint(e.t, e.segIndex);
    if (e instanceof St)
      return z.getFunction(e.name)(t);
    throw new Error("unknow anchor type:" + e);
  }
  static getPointOnLinkHost(t, e) {
    const n = yt;
    let r = e.takePoint();
    if (r != null)
      return r;
    if (e instanceof Ae)
      throw new Error("NDC坐标不能用于Link");
    if (e instanceof bt)
      throw new Error(n(440));
    if (e instanceof Gt)
      return t.getLocalPoint(e.t, e.segIndex);
    if (e instanceof ut)
      return { x: e.x, y: e.y };
    if (e instanceof St)
      return z[n(423)](e.name)(t);
    throw new Error(n(416) + e);
  }
  static [yt(429)](t, e) {
    const n = yt;
    let r = t.begin == e ? t[n(422)] : t.begin, i = e[n(414)], o = e.host, a = i.takePoint();
    if (a != null)
      return a;
    if (i instanceof St)
      a = z.getFunction(i.name)(o);
    else if (i instanceof Gt || i instanceof Ae || i instanceof bt) {
      let h = e[n(430)]();
      a = N[n(441)](t, e[n(432)], h);
    } else
      i instanceof ut ? (a = { x: i.x, y: i.y }, o != null && (a = N.toLinkLocalPoint(t, e[n(432)], a))) : i instanceof Vn && (a = N.getAutoPointOnLink(t, e, r), a = t._invertWorldTransform.point(a));
    return a;
  }
  static getAutoPointOnLink(t, e, n) {
    const r = yt, i = e.host;
    let o;
    if (n[r(414)] instanceof Vn) {
      const a = n.host;
      o = { x: a._obb[r(434)][r(439)], y: a[r(417)].aabb.middle };
    } else
      o = N[r(429)](t, n);
    return i[r(443)](o);
  }
  static toLinkLocalPoint(t, e, n) {
    const r = yt;
    if (e.parent === t.parent)
      n = e._getLocalTransform().point(n);
    else {
      let i = e.getWorldTransform()[r(446)](n);
      n = t[r(445)].point(i);
    }
    return n;
  }
  toJSON(t) {
    const e = yt;
    let n = this.anchor.toJSON();
    if (this[e(432)] == null)
      delete n.host;
    else if (t != null && this.isDisplayObjectHost()) {
      let r = t.get(this.host);
      n.host = r;
    }
    return n;
  }
  static fromJSON(t, e) {
    const n = yt;
    let r = z[n(435)](t.className);
    Object.assign(r, t);
    let i = new N(r);
    if (e != null && typeof t[n(432)] == "number") {
      let o = e.get(t.host);
      i[n(432)] = o;
    }
    return i;
  }
}
const P = eo;
function to() {
  const s = ["_getAABBWithText", "getK", "rotation", "_textDirty", "dashed", "425680GOcRmR", "padding", "translate", "_shape", "roundRect", "skewY", "lineHeight", "textOffsetY", "rotateWithParent", "getPointAnchor", "draw", "_paintText", "fillText", "_text", "10VNGdzq", "scale", "_serializers", "_afterStyleComputed", "textAlign", "width", "2452sJiCHT", "destroy", "6179292qgqazz", "addChild", "height", "contains", "text", "getOwnPropertyDescriptor", "black", "setOriginOnLink", "_positionToLocalPoint", "prototype", "top", "restore", "_localToNormal", "isPointInPolygon", "setLineDash", "_computedStyle", "13757030exErEf", "resizeWith", "_textHeight", "points", "font", "right", "135328XjnmLc", "left", "isEmpty", "_textPosition", "translateWith", "origin", "ownerLayer", "number", "_textArr", "_getTextRect", "union", "resize", "borderRadius", "648804zfVFeo", "borderWidth", "_textLineHeight", "save", "isNode", "getStyle", "hasBackgroundColor", "510ILUtSm", "629153FCqeSe", "originPosition", "borderColor", "same parent, dont need change", "_getTextAABB", "textBaseline", "_state", "_updateShapeSize", "getSegmentAnchor", "max", "shapeSize", "bottom", "_zIndex", "length", "_calcOriginInParentLink", "fill", "21eLklFs", "_drawContentDesc", "textRotation", "_textWidth", "rotate", "updateMatrix", "measureText"];
  return (to = function() {
    return s;
  })();
}
(function() {
  const s = eo, t = to();
  for (; ; )
    try {
      if (-parseInt(s(396)) / 1 * (-parseInt(s(445)) / 2) + parseInt(s(413)) / 3 * (-parseInt(s(425)) / 4) + -parseInt(s(439)) / 5 * (parseInt(s(389)) / 6) + parseInt(s(397)) / 7 + parseInt(s(469)) / 8 + -parseInt(s(447)) / 9 + parseInt(s(463)) / 10 === 459962)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var cl = Object.defineProperty, ul = Object[P(452)], Vt = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? ul(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && cl(t, e, i), i;
};
class C extends at {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    const o = P;
    super(), this[o(403)] = { _needPaint: !0, _isOutOfViewport: !1, _attrDirty: !0, _textDirty: !1 }, this[o(398)] = "center", this[o(414)] = { hasBorder: !1, hasBackgroundColor: !1, shapeSize: { width: 1, height: 1 } }, t != null && (this.text = t, this._state[o(423)] = !0), this._x = e || 0, this._y = n || 0, this._width = r || 0, this._height = i || 0, this._obb.aabb = new E(e - 0.5 * r, n - 0.5 * i, r, i);
  }
  get text() {
    return this._text;
  }
  set text(t) {
    this.setText(t);
  }
  _getShapeSize() {
    return this._drawContentDesc.shapeSize;
  }
  [P(434)](t, e) {
    return new N(new ut(t, e), this);
  }
  [P(405)](t, e) {
    return new N(new Gt(null, t, e), this);
  }
  getAnchor(t) {
    let e = this[P(428)].getConnectionAnchor(t);
    if (e == null)
      throw new Error("anchor not found:" + t);
    return new N(e, this);
  }
  [P(454)](t, e = null) {
    const n = P;
    return this.origin == null ? this[n(474)] = [e, t] : (this.origin[0] = e, this[n(474)][1] = t), this._matrixDirty = !0, this;
  }
  _getOBBPoints() {
    const t = P;
    this._updateShapeSize();
    let e = 0.5 * this.width, n = 0.5 * this[t(449)], r = -e, i = -n;
    return [{ x: r, y: i }, { x: e, y: i }, { x: e, y: n }, { x: r, y: n }];
  }
  [P(442)]() {
    const t = P, e = this._computedStyle, n = this._drawContentDesc;
    n[t(395)] = e.backgroundColor != null, n.hasBorder = e[t(390)] > 0;
  }
  _afterUpdateMatrix() {
    const t = P;
    (this._matrixDirty || this._state._textDirty || this._computedStyle._textDirty) && (this._updateText(), this._state._textDirty && (this._state._textDirty = !1, this.updateMatrix()), this[t(403)]._textDirty = !1, this[t(462)][t(423)] = !1);
  }
  _calcOriginInParentLink() {
    const t = P, e = this.parent;
    if (this === e.beginArrow || this === e.endArrow)
      return [0, 0];
    let n = this.origin[0], r = this[t(474)][1], i = e.getPoint(r, n);
    return [i.x, i.y];
  }
  _getRotationOnParentLink() {
    const t = P, e = this.parent;
    if (e == null || e.deep < Q.MinDeep || e.isNode || !this[t(433)])
      return 0;
    let n = e;
    if (this === n.beginArrow || this === n.endArrow)
      return 0;
    let r = this.origin[0], i = this.origin[1];
    return e[t(421)](i, r);
  }
  _doTransform(t) {
    const e = P, n = this;
    if (n.isLink)
      throw new Error("link no transform");
    let r = n.rotation, i = n.x, o = n.y;
    if (n.parent) {
      if (n.parent.isLink) {
        r += n._getRotationOnParentLink();
        let h = n[e(411)]();
        i = h[0] + n.x, o = h[1] + n.y;
      } else if (n.parent[e(393)] && this.originPosition != te.center) {
        let h = this._positionToLocalPoint(this[e(398)]);
        i += h.x, o += h.y;
      }
    }
    if (n.originPosition == te.center)
      return t[e(417)](r), void t.transform(n.scaleX, n.skewX, n[e(430)], n.scaleY, i, o);
    let a = n._positionToLocalPoint(n.originPosition);
    t.rotateByXY(a.x, a.y, r), t.transform(n.scaleX, n.skewX, n[e(430)], n.scaleY, i, o);
  }
  [P(404)]() {
    const t = P, e = this[t(462)];
    let n = 2 * (e.borderWidth || 0) + (2 * (e[t(426)] || 0) + (e.lineWidth || 0));
    const r = Math.max(0, this.width - n), i = Math[t(406)](0, this[t(449)] - n);
    this._drawContentDesc.shapeSize[t(444)] = r, this._drawContentDesc.shapeSize.height = i;
  }
  [P(459)](t, e) {
    const n = P;
    let r = this._drawContentDesc[n(407)];
    return { x: t / Math.max(0.5 * r.width, 1), y: e / Math.max(0.5 * r[n(449)], 1) };
  }
  setText(t) {
    const e = P;
    if (t != this._text && (this._state[e(423)] = !0, this._matrixDirty = !0), t == null)
      return this._text = t, void (this._textArr = null);
    if (typeof t == e(476) && (t = "" + t), t.indexOf(`
`) != -1) {
      let n = t.split(`
`);
      this[e(384)] = n;
    } else
      this._textArr = null;
    this._text = t;
  }
  _calcTextSize() {
    const t = P;
    let e, n = this._textArr == null ? 1 : this._textArr.length, r = this._computedStyle.font;
    r == null && (r = this.ownerLayer ? this[t(475)].stage.styleSystem.currentTheme[t(394)]("DefaultConfig")[t(467)] : Me.DefaultFont), e = n == 1 ? Ut[t(419)](this[t(438)], this._computedStyle, n, r) : Ut[t(419)](this._textArr, this._computedStyle, n, r), this[t(416)] = e.width, this._textHeight = e.height, this._textLineHeight = e[t(431)];
  }
  _drawBackgroundOrBorder(t) {
    const e = P, n = this._computedStyle, r = this._drawContentDesc;
    let i = n.borderWidth || 0, o = 0.5 * -this[e(444)] + 0.5 * i, a = 0.5 * -this.height + 0.5 * i, h = this[e(444)] - i, l = this.height - i, c = n[e(388)] || 0;
    t.save(), t.beginPath(), c == 0 ? t.rect(o, a, h, l) : t[e(429)](o, a, h, l, c), r.hasBackgroundColor && (t.fillStyle = n.backgroundColor, t[e(412)]()), r.hasBorder && (n.padding == null || n.padding == 0 ? t.lineWidth = i + 0.5 : t.lineWidth = i, t.strokeStyle = n[e(399)] || e(453), (n.borderStyle == e(424) || n.borderStyle == "dotted") && t[e(461)]([1, 1]), t.stroke()), t.closePath(), t.restore();
  }
  _strokeAndFill(t) {
    const e = P;
    let n = this._drawContentDesc;
    t[e(392)](), (n.hasBorder || n[e(395)]) && this._drawBackgroundOrBorder(t), this[e(428)].draw(t, this), t[e(458)]();
  }
  [P(435)](t) {
    const e = P;
    this._computedStyle.applyTo(t), this._strokeAndFill(t), this[e(436)](t);
  }
  _updateText() {
    this._calcTextSize(), this._calcTextPosition();
  }
  _calcTextPosition(t = 0, e = 0) {
    const n = P;
    let r = this._computedStyle, i = null;
    if (r.textPosition != null) {
      let l = Vi.get(r.textPosition);
      i = { x: l.x * this.width * 0.5, y: l.y * this.height * 0.5 };
    } else
      i = { x: 0, y: 0.5 * this.height };
    let o = 0, a = 0.5 * -(this[n(465)] - this[n(391)]), h = t + e + 0.5 * r.lineWidth;
    return r[n(443)] == n(470) ? o = h : r[n(443)] == "right" && (o = -h), r[n(402)] == "top" ? a = h : r[n(402)] == n(408) && (a = -h - this[n(465)] + this._textLineHeight), i.x += o, i.y += a, r.textOffsetX != null && (i.x += r.textOffsetX), r[n(432)] != null && (i.y += r[n(432)]), this._textPosition = i, i;
  }
  [P(436)](t) {
    const e = P;
    if (this._isTextBlank())
      return;
    let n = this._text, r = this._computedStyle, i = this[e(472)] || { x: 0, y: 0 }, o = this._textArr;
    if (t.fillStyle = r.color || "black", this.textRotation == 0)
      if (o == null)
        t.fillText(n, i.x, i.y);
      else {
        let a = this._textLineHeight;
        for (let h = 0; h < o.length; h++)
          t[e(437)](o[h], i.x, i.y + h * a);
      }
    else {
      if (t.translate(i.x, i.y), t.rotate(this[e(415)]), o == null)
        t.fillText(n, 0, 0);
      else {
        let a = this[e(391)];
        for (let h = 0; h < o.length; h++)
          t.fillText(o[h], 0, 0 + h * a);
      }
      t.rotate(-this.text), t.translate(-i.x, -i.y);
    }
  }
  getConnectAutoPoint(t) {
    return this[P(428)].getConnectAutoPoint(t.x, t.y, this);
  }
  setOriginPosition(t) {
    return this.originPosition = t, this;
  }
  [P(473)](t, e) {
    return this.x += t, this.y += e, this;
  }
  translateTo(t, e) {
    return this.x = t, this.y = e, this;
  }
  [P(427)](t, e) {
    return this.x = t, this.y = e, this;
  }
  setXY(t, e) {
    return this.x = t, this.y = e, this;
  }
  [P(387)](t, e) {
    return this.width = t, this.height = e, this;
  }
  setSize(t, e) {
    const n = P;
    return this.width = t, this[n(449)] = e, this;
  }
  skew(t, e) {
    const n = P;
    return this.skewX = t, this[n(430)] = e, this;
  }
  [P(464)](t, e) {
    const n = P;
    return this.width += t, this[n(449)] += e, this.width < 0 && (this.width = 0), this[n(449)] < 0 && (this[n(449)] = 0), this;
  }
  scaleBy(t, e) {
    return this.scaleX *= t, this.scaleY *= e, this;
  }
  [P(440)](t, e) {
    return this.scaleX = t, this.scaleY = e, this;
  }
  rotate(t) {
    return this[P(422)] = t, this;
  }
  rotateWith(t) {
    return this.rotation += t, this;
  }
  getRect() {
    const t = P;
    return new E(this.x - 0.5 * this[t(444)], this.y - 0.5 * this.height, this.width, this.height);
  }
  changeParent(t) {
    const e = P;
    if (this.parent === t)
      throw new Error(e(400));
    let n = this;
    n._matrixDirty && n.updateMatrix(), t._matrixDirty && t[e(418)]();
    let r = n.localToWorldXY(0, 0), i = t.worldToLocalXY(r.x, r.y);
    return n.parent && n.parent.removeChild(n), n.setXY(i.x, i.y), t[e(448)](n), this;
  }
  [P(455)](t) {
    const e = P;
    let n = Ns[t];
    if (n == null)
      throw Error("position not exist:" + t);
    return { x: n[0] * this.width * 0.5, y: n[1] * this[e(449)] * 0.5 };
  }
  _toJSON(t) {
    let e = super._toJSON(t);
    if (t != null) {
      let n = t.shapeIndexMap;
      if (this._shape != null) {
        let r = n.get(this._shape);
        r != null && (e.shape = r);
      }
    }
    return e;
  }
  hitTest(t, e) {
    const n = P;
    return !this._isTextBlank() && this[n(401)]().contains(t, e) ? !0 : !!this.getAABB()[n(450)](t, e) && ot[n(460)]({ x: t, y: e }, this._obb[n(466)]);
  }
  _isTextBlank() {
    const t = P;
    return this.text == null || this[t(451)] == "";
  }
  [P(385)]() {
    const t = P;
    if (this._isTextBlank())
      return new E(0, 0, 0, 0);
    let e = this, n = e.getComputedStyle(), r = e._textPosition, i = e[t(384)] == null ? 1 : e._textArr[t(410)], o = new E(r.x, r.y, e[t(416)], e[t(465)]), a = n.textAlign, h = n.textBaseline;
    return a == "left" ? o.x = r.x + 0.5 * o.width : a == t(468) && (o.x = r.x - 0.5 * o[t(444)]), h == t(457) ? o.y = r.y + 0.5 * o.height : h == "bottom" ? i > 1 ? o.y += 0.5 * o.height - this._textLineHeight : o.y = r.y - 0.5 * o[t(449)] : i > 1 && (o.y += 0.5 * o.height - 0.5 * this[t(391)]), o.x -= 0.5 * o.width, o.y -= 0.5 * o.height, o;
  }
  _getTextAABB() {
    const t = P;
    let e = this._getTextRect();
    if (e[t(471)]())
      return e;
    let n = this.getWorldTransform(), r = e.toPoints(), i = n.points(r, r);
    return pe.toAABB(e, i);
  }
  [P(420)]() {
    const t = P;
    let e = this.getAABB(), n = null;
    return !this._isTextBlank() && (n = this._getTextAABB(), !n.isEmpty() && (e = E[t(386)](n, e))), e;
  }
  [P(446)]() {
    const t = P;
    super[t(446)](), this[t(428)] = null, this[t(438)] = null, this._textArr = null, this[t(403)] = null;
  }
}
function eo(s, t) {
  const e = to();
  return (eo = function(n, r) {
    return e[n -= 384];
  })(s, t);
}
Vt([p("Node")], C[P(456)], "className", 2), Vt([p(!0)], C.prototype, "rotateWithParent", 2), Vt([p(null)], C.prototype, P(438), 2), Vt([p(null)], C[P(456)], P(384), 2), Vt([p(0)], C.prototype, "_textWidth", 2), Vt([p(0)], C.prototype, "_textHeight", 2), Vt([p(0)], C.prototype, "_textLineHeight", 2), Vt([p(!0)], C.prototype, "isNode", 2), Vt([p(Rs.Node)], C.prototype, P(409), 2), Vt([p(0)], C.prototype, "textRotation", 2), Vt([p(at.prototype[P(441)].concat(["text", "x", "y", "width", P(449), "skewX", "skewY", "scaleX", "scaleY", "rotation", "textOffsetX", "textOffsetY", P(415), "originPosition", "rotateWithParent"]))], C.prototype, "_serializers", 2);
const oe = hs;
function hs(s, t) {
  const e = no();
  return (hs = function(n, r) {
    return e[n -= 164];
  })(s, t);
}
(function() {
  const s = hs, t = no();
  for (; ; )
    try {
      if (-parseInt(s(172)) / 1 + -parseInt(s(164)) / 2 * (parseInt(s(169)) / 3) + -parseInt(s(177)) / 4 + -parseInt(s(182)) / 5 + -parseInt(s(167)) / 6 * (parseInt(s(175)) / 7) + parseInt(s(186)) / 8 + parseInt(s(180)) / 9 * (parseInt(s(165)) / 10) === 979523)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var pl = Object.defineProperty, dl = Object.getOwnPropertyDescriptor, Ba = (s, t, e, n) => {
  const r = hs;
  for (var i, o = n > 1 ? void 0 : n ? dl(t, e) : t, a = s[r(184)] - 1; a >= 0; a--)
    (i = s[a]) && (o = (n ? i(t, e, o) : i(o)) || o);
  return n && o && pl(t, e, o), o;
};
function no() {
  const s = ["bottom", "updateMatrix", "aabb", "_calcTextSize", "TextNode", "10XydGQZ", "36018790cmBdsM", "autoSize", "10361262ccFZSp", "_calcTextPosition", "1083003iyEYYg", "_autoSize", "_autoDirection", "1232496iRQCje", "borderWidth", "textPosition", "7xHZnzs", "_obb", "6054672lOWozi", "autoDirection", "prototype", "18dtJWHd", "toAABB", "1728330IqnJiz", "_worldTransform", "length", "_computedStyle", "3195816DrvBWq", "rotation"];
  return (no = function() {
    return s;
  })();
}
class qe extends C {
  constructor(t, e = 0, n = 0, r = 1, i = 1, o = !0) {
    const a = hs;
    super(t, e, n, r, i), this[a(171)] = !0, this[a(170)] = !0, this[a(166)] = o;
  }
  get autoSize() {
    return this._autoSize;
  }
  set [oe(166)](t) {
    this[oe(170)] = t;
  }
  get [oe(178)]() {
    return this._autoDirection;
  }
  set autoDirection(t) {
    this._autoDirection !== t && (this._autoDirection = t, this._updateText());
  }
  updateMatrix() {
    const t = oe, e = this;
    if (e.autoDirection == 1) {
      let n = e._getRotationOnParentLink();
      n < -Math.PI / 2 || n > Math.PI / 2 ? e[t(187)] !== Math.PI && (e.rotation = Math.PI) : e[t(187)] !== 0 && (e.rotation = 0);
    }
    return super[t(189)](), this;
  }
  _updateText() {
    this[oe(191)](), this._autoSize && this.resizeToFitText(), this._calcTextPosition();
  }
  resizeToFitText() {
    const t = oe;
    let e = this[t(185)].computePadding();
    this.width = this._textWidth + e, this.height = this._textHeight + e;
    let n = this._getOBBPoints(), r = this[t(183)].points([], n), i = this[t(176)];
    return i.points = r, i[t(190)] = pe[t(181)](i[t(190)], r), this;
  }
  [oe(168)]() {
    const t = oe, e = this._computedStyle;
    let n = e[t(173)] || 0, r = (e.padding || 0) + (0 | e.lineWidth);
    return (e.textBaseline != t(188) || e.textPosition != "lt" && e.textPosition != "ct" && e.textPosition != "rt") && (e.textBaseline != "top" || e.textPosition != "lb" && e[t(174)] != "cb" && e.textPosition != "rb") && (e.textAlign != "right" || e.textPosition != "lt" && e[t(174)] != "lm" && e.textPosition != "lb") ? e.textAlign == "left" && (e.textPosition == "rt" || e[t(174)] == "rm" || e.textPosition == "rb") && (n = 0, r = 0) : (n = 0, r = 0), super._calcTextPosition(n, r);
  }
}
Ba([p(oe(192))], qe[oe(179)], "className", 2), Ba([p(C.prototype._serializers.concat(["autoSize", "autoDirection"]))], qe.prototype, "_serializers", 2);
const xr = Zs;
function so() {
  const s = ["duration", "17458kwXSCQ", "clockwise", "4172311ceevLu", "setStyle", "lineDashOffset", "flow", "onEnd", "type", "530888sJnoQW", "85419uCFgOG", "globalAlpha", "2262dXueTj", "font", "10chIsuO", "426AHoQXw", "104LtbexN", "416198pBFPAI", "lineDash", "33564nFxVQM", "setStyles", "1aUBUAz", "1612152zRZYtw", "style", "15NmzOJz"];
  return (so = function() {
    return s;
  })();
}
function Zs(s, t) {
  const e = so();
  return (Zs = function(n, r) {
    return e[n -= 278];
  })(s, t);
}
(function() {
  const s = Zs, t = so();
  for (; ; )
    try {
      if (-parseInt(s(282)) / 1 * (-parseInt(s(278)) / 2) + parseInt(s(283)) / 3 + parseInt(s(295)) / 4 * (-parseInt(s(285)) / 5) + parseInt(s(301)) / 6 * (parseInt(s(287)) / 7) + -parseInt(s(302)) / 8 * (parseInt(s(296)) / 9) + -parseInt(s(300)) / 10 * (-parseInt(s(289)) / 11) + parseInt(s(280)) / 12 * (-parseInt(s(298)) / 13) === 293631)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class fl {
  constructor(t, e) {
    this.stage = t, this.animationSystem = e;
  }
  flash(t, e = {}) {
    const n = Zs;
    let r = e.times || 3, i = e[n(286)] || 100, o = this.animationSystem, a = t[n(284)][n(297)], h = o.anime({ from: [0], to: [1], update: (l) => {
      const c = n;
      t.setStyle(c(297), l[0]);
    }, times: r, effect: "easeOutBounce", duration: i });
    return h[n(293)] = () => {
      t.setStyle("globalAlpha", a);
    }, h;
  }
  [xr(292)](t, e = {}) {
    const n = xr;
    let r = e[n(279)] || t.style[n(279)] || [3, 2], i = e.direction || Bt.clockwise, o = e[n(286)] || 1e4, a = e.distance || 300, h = i == Bt[n(288)] ? 1 : -1, l = this.animationSystem;
    t[n(290)]("lineDash", r);
    let c = l.anime({ from: 0, to: a, update: (u) => {
      const d = n;
      t.setStyle(d(291), -u * h);
    }, times: 1 / 0, duration: o });
    return c.onEnd = () => {
      const u = n;
      t.setStyle(u(291), 0);
    }, c;
  }
  linkMark(t, e = { color: "red" }) {
    const n = xr;
    let r = e.text || "❌️", i = new qe(r, 0, 0);
    return i[n(294)] = "EffectNode", i.draggable = !1, i[n(281)]({ textPosition: te.center, textBaseline: zt.middle, textAlign: Mt.center, color: e.color || "red" }), e.font != null && i[n(281)]({ font: e[n(299)] }), i.setOriginOnLink(0.5), t.addChild(i), i;
  }
}
function dh(s, t) {
  const e = ro();
  return (dh = function(n, r) {
    return e[n -= 468];
  })(s, t);
}
function ro() {
  const s = ["903WiGRWm", "1053255JTIvGU", "6860FWCKhR", "18725IWRfPj", "1794UIolAo", "21324654RrahRT", "700722efMiAU", "140672VTUREV", "5504048rbiTNh"];
  return (ro = function() {
    return s;
  })();
}
(function() {
  const s = dh, t = ro();
  for (; ; )
    try {
      if (parseInt(s(475)) / 1 + parseInt(s(474)) / 2 + parseInt(s(468)) / 3 * (-parseInt(s(470)) / 4) + -parseInt(s(469)) / 5 + -parseInt(s(472)) / 6 * (parseInt(s(471)) / 7) + -parseInt(s(476)) / 8 + parseInt(s(473)) / 9 === 645742)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
let Fn = { paintAABB: !1, debugInfo: null, build: "5:25:07 PM" };
const en = Qs;
function io() {
  const s = ["yInWorld", "isIdle", "domElement", ")</li>", "div", "46017960RmPtMj", "init", "10452078vKPxgm", "15JqzAST", "createElement", "style", "toScreenXY", "<li>", "2738214gInSoO", "viewLayers", "origin", ", y: ", "show", ",w: ", ") </li>", "<li>Mouse-Canvas( x: ", "3462850OqTQzl", "toFixed", "stage", "<li>Painted: ", "xInWorld", "<li>&nbsp;&nbsp;-Parent: (x: ", "</li>", "length", "jtopo_debugPanel", "<li>&nbsp;&nbsp;-Canvas: (x: ", "9381449tdYWXr", "hide", "inputSystem", "ceil", "innerHTML", "debugInfo", "692375ZQJCrY", "312684StLOAz", "classList"];
  return (io = function() {
    return s;
  })();
}
function Qs(s, t) {
  const e = io();
  return (Qs = function(n, r) {
    return e[n -= 295];
  })(s, t);
}
(function() {
  const s = Qs, t = io();
  for (; ; )
    try {
      if (-parseInt(s(321)) / 1 + -parseInt(s(305)) / 2 + parseInt(s(297)) / 3 + -parseInt(s(322)) / 4 * (parseInt(s(332)) / 5) + -parseInt(s(331)) / 6 + -parseInt(s(315)) / 7 + parseInt(s(329)) / 8 === 924450)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class gl {
  constructor(t) {
    this._debug = Fn, this.numberFixed = 0, this.stage = t;
  }
  [en(330)]() {
    const t = en, e = document[t(333)](t(328));
    e[t(323)].add(t(313)), this.stage.uiContainer.appendChild(e), this.domElement = e, this[t(316)]();
  }
  start(t = 24) {
    const e = this, n = this.stage;
    this._timer = setInterval(function() {
      const r = Qs;
      let i = n[r(317)];
      if (i[r(325)])
        return;
      let o = n[r(298)], a = 0, h = 0, l = 0;
      for (let x = 0; x < o.length; x++) {
        let m = o[x];
        a += m.displayList.length, h += m.getAllNodes().length, l += m.getAllLinks()[r(312)];
      }
      let c = Math.ceil(i.x), u = Math[r(318)](i.y);
      const d = n.inputSystem.target;
      let f = r(304) + c + " y: " + u + r(327);
      if (i.xInWorld != null && (f += "<li>Mouse-World( x: " + i[r(309)][r(306)](2) + " y: " + i[r(324)].toFixed(2) + ")</li>"), f += "<li>Nodes: " + h + r(311), f += "<li>Links: " + l + "</li>", f += "<li>Total: " + (h + l) + r(311), f += r(308) + a + "</li>", d) {
        const x = d._obb.aabb, m = d.localToWorldXY(0, 0), I = this[r(307)].camera[r(295)](m.x, m.y), y = this.numberFixed;
        f += "<li>_aabb:[x:" + x.x.toFixed(y) + ",y: " + x.y.toFixed(y) + r(302) + x.width.toFixed(y) + ", h:" + x.height.toFixed(y) + "] </li>", f += "<li>Origin: [" + d[r(299)][0].toFixed(y) + ", " + d.origin[1].toFixed(y) + "]</li>", f += r(314) + I.x.toFixed(y) + ", y: " + I.y.toFixed(y) + ") </li>", d instanceof C && (f += r(310) + d.x.toFixed(y) + ", y: " + d.y[r(306)](y) + r(303)), f += "<li>&nbsp;&nbsp;-Layer:  (x: " + m.x[r(306)](y) + r(300) + m.y.toFixed(y) + ") </li>";
      }
      Fn.debugInfo && (f += r(296) + Fn[r(320)] + "</li>"), e.setContent(f);
    }, t);
  }
  setContent(t) {
    const e = en;
    this.domElement[e(319)] = t;
  }
  checkDom() {
    this[en(326)] == null && this.init();
  }
  hide() {
    const t = en;
    return this.checkDom(), clearInterval(this._timer), this.domElement[t(334)].display = "none", this;
  }
  [en(301)](t) {
    return this.checkDom(), this.domElement.style.display = "block", this.start(t), this;
  }
}
const qt = Kn;
function Kn(s, t) {
  const e = oo();
  return (Kn = function(n, r) {
    return e[n -= 393];
  })(s, t);
}
function oo() {
  const s = ["flatten", "10ZqwZUN", "push", "length", "object", "1422012OOSCCP", "union", "width", "246116dcrfRp", "8087937VJAKlj", "getRect", "3lqILlF", "join", "children", "10809732QVIufF", "text", "689164MkgUKB", "rect", "getChildrenRect", "translateWithRecursive", "translate", "getVNodeUnionRect", "map", "160iPATOu", "translateWith", "1346726pmKzqx", "13725135MACfwP", "128SADgIw"];
  return (oo = function() {
    return s;
  })();
}
(function() {
  const s = Kn, t = oo();
  for (; ; )
    try {
      if (-parseInt(s(401)) / 1 + -parseInt(s(393)) / 2 * (parseInt(s(407)) / 3) + parseInt(s(404)) / 4 * (parseInt(s(419)) / 5) + parseInt(s(410)) / 6 + parseInt(s(412)) / 7 * (parseInt(s(395)) / 8) + -parseInt(s(394)) / 9 + parseInt(s(397)) / 10 * (-parseInt(s(405)) / 11) === 990125)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class un {
  constructor(t = 0, e = 0, n = 1, r = 1) {
    this.x = 0, this.y = 0, this.width = 1, this.height = 1, this.rect = new E(0, 0, 1, 1), this.children = [], this.object = null, this.level = 0, this.x = t, this.y = e, this.width = n, this.height = r;
  }
  fromObject(t) {
    const e = Kn;
    this.object = t, this.x = t.x, this.y = t.y, this.width = t[e(403)], this.height = t.height;
  }
  setObject(t) {
    this.object = t;
  }
  getRect(t = !1) {
    const e = Kn;
    return this[e(413)].setTo(this.x, this.y, this.width, this.height), t ? E[e(402)](this.rect, this.getChildrenRect(!0)) : this.rect;
  }
  [qt(414)](t) {
    const e = qt;
    let n = this[e(409)], r = n[0].getRect(t);
    for (let i = 1; i < n.length; i++)
      r = E[e(402)](r, n[i].getRect(t));
    return r;
  }
  translateWith(t, e) {
    this.x += t, this.y += e;
  }
  [qt(416)](t, e) {
    this.x = t, this.y = e;
  }
  addChild(t) {
    const e = qt;
    t.parent = this, this[e(409)][e(398)](t);
  }
  translateWithRecursive(t, e) {
    const n = qt;
    this[n(420)](t, e);
    let r = this.children;
    for (let i = 0; i < r.length; i++)
      r[i][n(415)](t, e);
  }
  flatten(t) {
    const e = qt;
    let n = [];
    for (let r = 0; r < this.children[e(399)]; r++) {
      let i = this.children[r];
      if ((t == null || t(i) == 1) && (n.push(i), i[e(409)] && i.children.length > 0)) {
        let o = un.flatten(i.children, t);
        n = n.concat(o);
      }
    }
    return n;
  }
  toString() {
    const t = qt;
    return this[t(400)][t(411)] + ": 	" + un.flatten(this.children)[t(418)]((e) => e[t(400)].text)[t(408)](",");
  }
  static [qt(417)](t) {
    const e = qt;
    let n = t[0][e(406)]();
    for (let r = 1; r < t.length; r++)
      n = E.union(n, t[r].getRect());
    return n;
  }
  static [qt(396)](t, e) {
    const n = qt;
    let r = [];
    for (let i = 0; i < t.length; i++) {
      let o = t[i];
      if ((e == null || e(o) == 1) && (r.push(o), o[n(409)] && o[n(409)].length > 0)) {
        let a = un.flatten(o.children, e);
        r = r.concat(a);
      }
    }
    return r;
  }
}
const bs = Ee;
function ao() {
  const s = ["getCenter", "union", "concat", "allVirtualNodes", "6806500wfkRMp", "translateWith", "481736gyhtUM", "358292zLAaqT", "3PysLlh", "171248Swizal", "indexData", "allObjects", "children", "getRect", "index", "translateTo", "8zGbhTk", "root", "2642466gHEpUQ", "1115042iVggxs", "5294655SNSWKY", "forEach", "length", "object", "10qibHIX"];
  return (ao = function() {
    return s;
  })();
}
function Ee(s, t) {
  const e = ao();
  return (Ee = function(n, r) {
    return e[n -= 396];
  })(s, t);
}
(function() {
  const s = Ee, t = ao();
  for (; ; )
    try {
      if (-parseInt(s(404)) / 1 + -parseInt(s(416)) / 2 * (-parseInt(s(405)) / 3) + parseInt(s(403)) / 4 * (-parseInt(s(396)) / 5) + parseInt(s(415)) / 6 + -parseInt(s(406)) / 7 * (-parseInt(s(413)) / 8) + parseInt(s(417)) / 9 + -parseInt(s(401)) / 10 === 330881)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class yl {
  constructor(t) {
    const e = Ee;
    this.deep = 0, this[e(414)] = t, this.descendants = t.flatten(), this.allVirtualNodes = [t][e(399)](this.descendants), this[e(408)] = this.allVirtualNodes.map((n) => n[e(420)]), this.indexData = [], this[e(411)]();
  }
  index() {
    let t = [];
    const e = this;
    (function n(r, i) {
      const o = Ee;
      e.deep < i && (e.deep = i);
      let a = r[o(409)], h = t[i];
      h == null && (h = [], t[i] = h), h.push(r);
      for (let l = 0; l < a.length; l++)
        n(a[l], i + 1);
    })(this[Ee(414)], 0), this.indexData = t;
  }
  getRect() {
    const t = Ee, e = this.root.flatten();
    if (e.length == 0)
      throw new Error("getRect() in empty tree");
    let n = e[0].getRect();
    for (let r = 1; r < e[t(419)]; r++) {
      const i = e[r];
      n = E.union(n, i.getRect());
    }
    return n;
  }
  centerTo(t, e) {
    const n = Ee, r = this.allVirtualNodes;
    let i = this[n(414)][n(410)]();
    r.forEach((l) => {
      i = E[n(398)](i, l.getRect());
    });
    let o = i[n(397)](), a = t - o.x, h = e - o.y;
    return r.forEach((l) => {
      l[n(402)](a, h);
    }), this;
  }
  [bs(412)](t, e) {
    const n = bs, r = this.allVirtualNodes;
    let i = this[n(414)].getRect();
    r.forEach((h) => {
      i = E.union(i, h.getRect());
    });
    let o = t - i.x, a = e - i.y;
    return r.forEach((h) => {
      h[n(402)](o, a);
    }), this;
  }
  translateWith(t, e) {
    const n = bs;
    return this[n(400)][n(418)]((r) => {
      r[n(402)](t, e);
    }), this;
  }
  getLeafs() {
    return this[bs(407)][this.deep];
  }
}
const Tt = Ke;
function ho() {
  const s = ["concat", "outputs", "713452AefWjU", "forEach", "weight", "getAdjacentList", "clone", "3196280eDgMSV", "check", "edges", "filter", "isTrack", "1789842FjlCRF", "isTrace", "inputs", "7BbpHuh", "801343ttuTdv", "253LhQwSw", "1365JQQcjJ", "6zgFdbm", "add", "205140ZnRCqO", "4XhEMTp", "252564yKJliD", "getDegree", "9vSaAAR", "length", "vertexes", "map", "2306175bNglLn", "isAdjacent", "push", "isZero"];
  return (ho = function() {
    return s;
  })();
}
(function() {
  const s = Ke, t = ho();
  for (; ; )
    try {
      if (-parseInt(s(317)) / 1 + parseInt(s(336)) / 2 * (-parseInt(s(320)) / 3) + -parseInt(s(323)) / 4 * (-parseInt(s(330)) / 5) + parseInt(s(313)) / 6 * (parseInt(s(316)) / 7) + -parseInt(s(308)) / 8 * (parseInt(s(326)) / 9) + -parseInt(s(322)) / 10 * (parseInt(s(318)) / 11) + -parseInt(s(324)) / 12 * (-parseInt(s(319)) / 13) === 583325)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class pn {
  constructor() {
    this[Ke(315)] = [], this.outputs = [];
  }
  getDegree() {
    return this.getInDegree() + this.getOutDegree();
  }
  getInDegree() {
    return this.inputs.length;
  }
  getOutDegree() {
    return this.outputs.length;
  }
  getAdjacentList() {
    const t = Ke;
    let e = this[t(335)].map((r) => r.to), n = this.inputs.map((r) => r.from);
    return e[t(334)](n);
  }
}
class Br {
  constructor(t, e) {
    const n = Ke;
    this[n(338)] = 0, this.from = t, this.to = e, t.outputs.push(this), e[n(315)].push(this);
  }
  isLoop() {
    return this.from === this.to;
  }
  [Tt(331)](t) {
    return this.from === t.from || this.from === t.to || this.to === t.from || this.to === t.to;
  }
}
class ml {
  constructor(t) {
    this.vertexes = t;
  }
  isClose(t) {
    return !1;
  }
  isTrace(t) {
    return !1;
  }
  isCircuit(t) {
    const e = Tt;
    return this.isClose(t) && this[e(314)](t);
  }
  [Tt(312)](t) {
    return !1;
  }
  isCycle(t) {
    const e = Tt;
    return this.isClose(t) && this[e(312)](t);
  }
}
function Ke(s, t) {
  const e = ho();
  return (Ke = function(n, r) {
    return e[n -= 306];
  })(s, t);
}
class Zn {
  constructor(t, e) {
    const n = Tt;
    this.hasDirection = !0, this[n(328)] = t, this.edges = e;
  }
  [Tt(333)]() {
    const t = Tt;
    return this.vertexes.length > 0 && this[t(310)][t(327)] == 0;
  }
  isAlone() {
    const t = Tt;
    return this.vertexes.length == 1 && this[t(310)].length == 0;
  }
  traverse(t, e = "depth", n = [], r = /* @__PURE__ */ new Set()) {
    const i = Tt;
    t == null && (t = this.vertexes[0]);
    let o = this;
    if (!r.has(t) && (n[i(332)](t), r.add(t)), e == "depth")
      t.getAdjacentList()[i(311)]((a) => !r.has(a))[i(329)]((a) => {
        !r.has(a) && (n.push(a), r.add(a)), o.traverse(a, e, n, r);
      });
    else {
      let a = t[i(306)]()[i(311)]((h) => !r.has(h));
      a.map((h) => {
        const l = i;
        n[l(332)](h), r[l(321)](h);
      }), a.map((h) => {
        o.traverse(h, e, n, r);
      });
    }
    return n;
  }
  getMaxDegreeVertext() {
    let t = this.vertexes[0];
    for (let e = 1; e < this.vertexes.length; e++) {
      const n = this.vertexes[e];
      n.getDegree() > t.getDegree() && (t = n);
    }
    return t;
  }
  getMinDegree() {
    const t = Tt;
    let e = this.vertexes[0].getDegree();
    for (let n = 1; n < this.vertexes.length; n++) {
      const r = this[t(328)][n];
      r.getDegree() < e && (e = r.getDegree());
    }
    return e;
  }
  getPathList(t, e, n = /* @__PURE__ */ new Set()) {
    return [];
  }
  getOrder() {
    return this.vertexes.length;
  }
  isBridge() {
  }
  isSubGraph(t) {
  }
  isTree() {
    const t = Tt;
    return this.vertexes[t(327)] != this.edges.length + 1 ? !1 : this.vertexes[t(327)] == 1 ? !0 : this.vertexes.filter((e) => e[t(325)]() == 1).length > 0;
  }
  travelNext(t) {
    let e = [];
    return function n(r) {
      const i = Ke;
      e.push(r);
      let o = r.outputs[i(329)]((a) => a.to);
      for (let a = 0; a < o.length; a++) {
        let h = o[a];
        if (h === t)
          return;
        n(h);
      }
    }(t), e;
  }
  [Tt(307)]() {
    let t = this.vertexes.slice();
    t.forEach((r) => {
      r.inputs = r.inputs.slice(), r.outputs = r.outputs.slice();
    });
    let e = this.edges.slice(), n = new Zn(t, e);
    return n.hasDirection = this.hasDirection, n;
  }
  [Tt(309)]() {
    const t = Tt;
    let e = 0;
    this.vertexes[t(337)]((r) => e += r.getDegree()), console.assert(e == 2 * this[t(310)].length);
    let n = this.vertexes.filter((r) => r.getDegree() % 2 != 0)[t(327)];
    console.assert(n % 2 == 0);
  }
}
const nn = lo;
function lo(s, t) {
  const e = co();
  return (lo = function(n, r) {
    return e[n -= 233];
  })(s, t);
}
function co() {
  const s = ["addChild", "2428013ugqpvt", "push", "begin", "from", "forEach", "46705xliIAF", "has", "3760076gxASGw", "object", "set", "filter", "get", "isNodeHost", "edges", "travelVertext", "createMinimalSpanningTree", "955359EQspop", "824082jUllaj", "fromObject", "host", "474056qAkiPj", "2320312tMUDiD", "map", "sort", "weight", "outputs", "570wYlyLz"];
  return (co = function() {
    return s;
  })();
}
(function() {
  const s = lo, t = co();
  for (; ; )
    try {
      if (parseInt(s(238)) / 1 + -parseInt(s(235)) / 2 + parseInt(s(234)) / 3 + parseInt(s(253)) / 4 + parseInt(s(251)) / 5 * (-parseInt(s(244)) / 6) + parseInt(s(246)) / 7 + -parseInt(s(239)) / 8 === 489912)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class mn {
  static [nn(233)](t) {
    const e = nn;
    let n = [], r = [], i = t[e(259)][e(241)]((a, h) => {
      let l = a[e(242)] - h.weight;
      return l == 0 && (l = a.from.getInDegree() - h.from.getInDegree(), l == 0 && (l = h.to.getOutDegree() - a.to.getOutDegree())), l;
    }), o = /* @__PURE__ */ new WeakMap();
    for (let a = 0; a < i.length; a++) {
      const h = i[a];
      let l = h.from, c = h.to, u = o.get(l), d = o[e(257)](c);
      if (u != null && d != null)
        continue;
      u == null && (u = new pn(), u[e(254)] = l.object, n.push(u), o.set(l, u)), d == null && (d = new pn(), d[e(254)] = c.object, n.push(d), o.set(c, d));
      let f = new Br(u, d);
      f[e(254)] = h[e(254)], r.push(f);
    }
    return new Zn(n, r);
  }
  getNodes(t) {
    return t.vertexes.map((e) => e.object);
  }
  getLinks(t) {
    return t.edges.map((e) => e.object);
  }
  objectsToGraphs(t) {
    const e = nn, n = t[e(256)]((h) => h instanceof C);
    let r = t.filter((h) => h instanceof B);
    r.filter((h) => h[e(248)][e(258)]() && h.end.isNodeHost());
    const i = /* @__PURE__ */ new WeakMap(), o = n.map((h) => {
      const l = new pn();
      return l.object = h, i.set(h, l), l;
    });
    r[e(256)]((h) => {
      const l = e;
      return i.get(h[l(248)].host) && i.get(h.end.host);
    });
    const a = r.map((h) => {
      const l = e;
      let c = i.get(h.begin.host), u = i.get(h.end.host), d = new Br(c, u);
      return d[l(254)] = h, d;
    });
    return this.toGraphs(o, a);
  }
  toGraphs(t, e) {
    const n = nn;
    let r = [];
    t.forEach((a) => {
      let h = a.inputs, l = a.outputs;
      r = r.concat(h), r = r.concat(l);
    });
    let i = [], o = /* @__PURE__ */ new Set();
    for (let a = 0; a < t.length; a++) {
      const h = t[a];
      if (o[n(252)](h))
        continue;
      let l = [], c = [];
      this.travelVertext(h, l, c, o);
      let u = new Zn(l, c);
      i[n(247)](u);
    }
    return i;
  }
  travelVertext(t, e = [], n = [], r = /* @__PURE__ */ new Set()) {
    const i = nn;
    if (r.has(t))
      return;
    e.push(t), r.add(t);
    let o = t.inputs.filter((l) => !r.has(l)), a = t[i(243)].filter((l) => !r.has(l));
    o.forEach((l) => {
      n.push(l), r.add(l);
    }), a[i(250)]((l) => {
      n.push(l), r.add(l);
    });
    let h = this;
    o.forEach((l) => {
      const c = i;
      h[c(260)](l[c(249)], e, n, r);
    }), a[i(250)]((l) => {
      h.travelVertext(l.to, e, n, r);
    });
  }
  toTree(t) {
    const e = nn;
    !t.isTree() && (t = mn.createMinimalSpanningTree(t));
    let n = t.vertexes[e(256)]((h) => h.getInDegree() == 0)[0].object, r = t.vertexes[e(240)]((h) => h.object), i = t.edges.map((h) => h[e(254)]);
    const o = /* @__PURE__ */ new WeakMap();
    let a = new un();
    return a[e(236)](n), o[e(255)](n, a), r.forEach((h) => {
      const l = e;
      if (h === n)
        return;
      const c = new un();
      c.fromObject(h), o[l(255)](h, c);
    }), i.forEach((h) => {
      const l = e;
      let c = o.get(h.begin.host), u = o.get(h.end[l(237)]);
      c[l(245)](u);
    }), new yl(a);
  }
}
const se = Qn;
function Qn(s, t) {
  const e = uo();
  return (Qn = function(n, r) {
    return e[n -= 394];
  })(s, t);
}
(function() {
  const s = Qn, t = uo();
  for (; ; )
    try {
      if (parseInt(s(399)) / 1 * (-parseInt(s(409)) / 2) + parseInt(s(408)) / 3 + parseInt(s(396)) / 4 + parseInt(s(410)) / 5 * (-parseInt(s(404)) / 6) + -parseInt(s(418)) / 7 * (-parseInt(s(401)) / 8) + parseInt(s(398)) / 9 * (-parseInt(s(400)) / 10) + parseInt(s(407)) / 11 * (parseInt(s(394)) / 12) === 453129)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Ne {
  constructor() {
    this.observers = [];
  }
  publish(t) {
    return this.observers.forEach((e) => {
      e(t);
    }), this;
  }
  [se(402)](t) {
    const e = se;
    if (this.observers.indexOf(t) != -1)
      throw new Error(e(403));
    return this.observers.push(t), this;
  }
  build(t) {
    let e = new Ne();
    return this.subscribe((n) => {
      t(e, n);
    }), e;
  }
  [se(416)](t) {
    const e = se;
    return this[e(397)]((n, r) => {
      const i = e;
      t(r) && n[i(412)](r);
    });
  }
  map(t) {
    return this.build((e, n) => {
      e.publish(t(n));
    });
  }
  reduce(t, e) {
    let n = e, r = !0;
    return this.build((i, o) => {
      r && e == null ? (r = !1, n = o) : n = t(o, n), i.publish(n);
    });
  }
  [se(417)]() {
    let t = "-#distinct#-";
    return this[se(397)]((e, n) => {
      t !== n && (t = n, e.publish(n));
    });
  }
  debounceTime(t) {
    let e;
    return this.build((n, r) => {
      e != null && clearTimeout(e), e = setTimeout(() => {
        n.publish(r);
      }, t);
    });
  }
  throttleTime(t) {
    let e = 0;
    return this.build((n, r) => {
      const i = Date.now();
      i - e >= t && (n.publish(r), e = i);
    });
  }
  delay(t) {
    return this.build((e, n) => {
      setTimeout(() => {
        e.publish(n);
      }, t);
    });
  }
  [se(413)](t = 2) {
    return this.bufferCount(t, 1);
  }
  [se(411)](t, e = 1) {
    let n = [];
    return this.build((r, i) => {
      const o = Qn;
      if (n.push(i), n[o(420)] == t) {
        r.publish(n);
        for (let a = 0; a < e; a++)
          n[o(395)]();
      }
    });
  }
  unsubscribe() {
    const t = se;
    this.observers[t(420)] = 0;
  }
  static fromEvent(t, e) {
    let n = new Ne(), r = (i) => {
      n.publish(i);
    };
    return t.addEventListener(e, r), n.unsubscribe = () => {
      t.removeEventListener(e, r);
    }, n;
  }
  static of(...t) {
    const e = se;
    let n, r = new Ne();
    return r.subscribe = function(i) {
      const o = Qn;
      return this.observers[o(414)](i), n = setTimeout(() => {
        t.forEach((a) => r.publish(a));
      }, 10), this;
    }, r[e(419)] = () => {
      clearTimeout(n);
    }, r;
  }
}
function uo() {
  const s = ["4722fQrzcU", "debounceTime", "log", "473FLllXk", "1908666UfiRqV", "982LHZIAM", "2845cfRlUb", "bufferCount", "publish", "pairwise", "push", "fromEvent", "filter", "distinct", "574wIqyAe", "unsubscribe", "length", "map", "212508gshPna", "shift", "757552qYNMfx", "build", "81mkdajb", "592phJhFy", "488910zetESg", "4344wfKJOr", "subscribe", "重复订阅"];
  return (uo = function() {
    return s;
  })();
}
function ln(s, t) {
  const e = po();
  return (ln = function(n, r) {
    return e[n -= 174];
  })(s, t);
}
function po() {
  const s = ["source", "forEach", "scrollTop", "95hsmtdz", "4kdWizv", "mozRequestFullScreen", "touches", "23353cOzwnR", "requestFullscreen", "offsetParent", "attachEvent", "fullScreen", "2992031HYMOoB", "clientY", "offsetLeft", "body", "left", "4595552ixXJHy", "none", "split", "webkitRequestFullscreen", "documentElement", "251352GHtYHI", "15730SzDCHZ", "_backup", "style", "FullWindowDom", "12AjXgkP", "pageXOffset", "8475048iDqnPl", "scrollLeft", "createElement", "777243WaOMae", "726554tdFbfF", "src", "position", "pageX"];
  return (po = function() {
    return s;
  })();
}
(function() {
  const s = ln, t = po();
  for (; ; )
    try {
      if (parseInt(s(204)) / 1 * (parseInt(s(175)) / 2) + -parseInt(s(203)) / 3 * (-parseInt(s(198)) / 4) + parseInt(s(174)) / 5 * (parseInt(s(193)) / 6) + -parseInt(s(183)) / 7 + parseInt(s(188)) / 8 + parseInt(s(200)) / 9 + parseInt(s(194)) / 10 * (-parseInt(s(178)) / 11) === 775503)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class ze {
  static addEventListener(t, e, n) {
    let r = t[ln(181)] || t.addEventListener;
    be.isFirefox() && e == "mousewheel" ? e = "DOMMouseScroll" : window.attachEvent && e.substring(0, 2) !== "on" && (e = "on" + e), r.call(t, e, n);
  }
  static createVideo(t, e) {
    const n = ln;
    if (typeof t == "string") {
      let r = document.createElement("video");
      r.muted = "muted", r.style.display = n(189);
      let i = document[n(202)](n(208));
      return i.setAttribute("_source", "jtopo"), i.type = "video/mp4", i[n(205)] = t, r.appendChild(i), document[n(186)].appendChild(r), r.oncanplay = function() {
        e(r);
      }, r;
    }
    return t;
  }
  static fullWindow(t) {
    const e = ln;
    let n = "position,width,height,left,top,bottom,right,zIndex"[e(190)](",");
    if (t.fullScreen == 1) {
      let r = t._backup;
      n[e(209)]((i) => {
        t.style[i] = r[i];
      }), t[e(182)] = !1;
    } else {
      let r = {};
      n.forEach((i) => {
        const o = e;
        r[i] = t[o(196)][i];
      }), t[e(195)] = r, t[e(196)][e(206)] = "fixed", t.style.left = 0, t.style.top = 0, t.style.bottom = 0, t.style.right = 0, t.style.zIndex = Rs[e(197)], t.fullScreen = !0;
    }
  }
  static fullScreen(t) {
    const e = ln;
    t.requestFullscreen ? t[e(179)]() : t.mozRequestFullScreen ? t[e(176)]() : t[e(191)] ? t.webkitRequestFullscreen() : t.msRequestFullscreen && t.msRequestFullscreen();
  }
}
function fo(s, t) {
  const e = go();
  return (fo = function(n, r) {
    return e[n -= 271];
  })(s, t);
}
ze.isMobileDevice = "ontouchstart" in window || navigator.maxTouchPoints > 0;
const ke = fo;
function go() {
  const s = ["3169579aWXauP", "72568ctzyRp", "onTouch", "1395vwBxxi", "230633sqCRgV", "3UJXFrn", "11341RWtjCK", "type", "touchStartHandler", "3840uasJwG", "776FOxKeU", "getCenter", "1435189RaKddP", "touches", "_dragWith", "touchendHandler", "clientX", "1412854vzgodF", "15200DGEyxK", "32180irVpHv", "lastTouchDistance", "touchsCount", "touchend", "toWorldXY", "length", "hypot", "clientY", "getDistance", "handlerLayer", "18rjLNjg"];
  return (go = function() {
    return s;
  })();
}
(function() {
  const s = fo, t = go();
  for (; ; )
    try {
      if (parseInt(s(284)) / 1 + -parseInt(s(289)) / 2 * (parseInt(s(277)) / 3) + -parseInt(s(282)) / 4 * (parseInt(s(291)) / 5) + parseInt(s(271)) / 6 * (-parseInt(s(272)) / 7) + parseInt(s(273)) / 8 * (-parseInt(s(275)) / 9) + -parseInt(s(290)) / 10 * (parseInt(s(278)) / 11) + parseInt(s(281)) / 12 * (parseInt(s(276)) / 13) === 825782)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class xl {
  constructor() {
    this.zomThreshold = 10, this.touchsCount = 0, this.lastTouchDistance = null, this.lastTouchCenter = null;
  }
  [ke(274)](t, e) {
    const n = ke;
    this[n(293)] = t.touches[n(296)], t[n(279)] == "touchmove" ? this.touchmoveHandler(t, e) : t.type == "touchstart" ? this[n(280)](t) : t[n(279)] == n(294) && this.touchendHandler(t);
  }
  touchStartHandler(t) {
    const e = ke;
    t.touches.length === 2 && (this.lastTouchDistance = this.getDistance(t.touches), this.lastTouchCenter = this[e(283)](t[e(285)]));
  }
  touchmoveHandler(t, e) {
    const n = ke;
    if (t.preventDefault(), t.touches[n(296)] !== 2 || this.lastTouchDistance == null || this.lastTouchCenter == null)
      return;
    const r = e[n(300)].render.canvas.getBoundingClientRect(), i = r.left, o = r.top, a = this[n(299)](t.touches), h = this.getCenter(t[n(285)]);
    if (Math.abs(a - this.lastTouchDistance) >= this.zomThreshold) {
      const l = a / this.lastTouchDistance, c = t.touches[0], u = t[n(285)][1];
      let d = e.camera[n(295)](0.5 * (u.clientX - i + (c.clientX - i)), 0.5 * (u.clientY - o + (c.clientY - o)));
      e.camera.zoomBy(l, d.x, d.y);
    } else {
      let l = h.x - this.lastTouchCenter.x, c = h.y - this.lastTouchCenter.y;
      e.camera[n(286)](l / e.camera.scale, c / e.camera.scale);
    }
    this[n(292)] = a, this.lastTouchCenter = h;
  }
  [ke(287)](t) {
    const e = ke;
    t[e(285)][e(296)] <= 2 && (this.lastTouchDistance = null, this.lastTouchCenter = null);
  }
  getDistance(t) {
    const e = ke;
    return Math[e(297)](t[1][e(288)] - t[0].clientX, t[1][e(298)] - t[0].clientY);
  }
  getCenter(t) {
    const e = ke;
    return { x: 0.5 * (t[0].clientX + t[1].clientX), y: 0.5 * (t[0].clientY + t[1][e(298)]) };
  }
}
const U = $s;
function yo() {
  const s = ["1339305UNmnrW", "isDraging", "467484iSCUBE", "dragover", "pointerup", "pointermove", "pointerdownHandler", "isDragStart", "mouseoverTarget", "buttons", "pointerdown", "eventObservable", "filter", "684914JHZDpu", "initEvents", "dispatchEvent", "click", "defaultPrevented", "type", "isDragEnd", "5691wYjVHR", "preventDefault", "publish", "updateBaseInfo", "touchmove", "undefined", "120001MgOVVI", "offsetY", "pointerDownY", "previous", "364692YMyEkp", "canvas", "view", "mode", "selectedGroup", "pointerDownX", "_idleTimer", "render", "inputSystem", "2296oMfMXp", "unselectedHandler", "target", "editor", "_updatePointerInfo", "isPrimary", "yInWorld", "_setTarget", "isPointerDown", "call", "pointerenter", "event", "camera", "pointerout", "isIdle", "addEventListener", "_onEvent", "defineProperty", "800784APlYav", "map", "isPointerOn", "reset", "stage", "timeStamp", "wheel"];
  return (yo = function() {
    return s;
  })();
}
function $s(s, t) {
  const e = yo();
  return ($s = function(n, r) {
    return e[n -= 275];
  })(s, t);
}
(function() {
  const s = $s, t = yo();
  for (; ; )
    try {
      if (-parseInt(s(306)) / 1 + parseInt(s(293)) / 2 + parseInt(s(310)) / 3 + -parseInt(s(337)) / 4 + -parseInt(s(280)) / 5 + parseInt(s(282)) / 6 + -parseInt(s(300)) / 7 * (-parseInt(s(319)) / 8) === 187208)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Il = typeof TouchEvent !== U(305), bl = ["pointerdown", U(284), "pointermove", U(329), "pointerout", U(279), U(296), "dblclick", "dragstart", "dragend", U(283), "drop", "touchstart", U(304), "touchend"];
class fh extends we {
  constructor(t) {
    const e = U;
    super(), this.skipPointerMovePicking = !1, this.touchWheel = new xl(), this.eventObservable = new Ne(), this[e(277)] = t, this[e(276)](), this[e(294)](), this._initObserve();
  }
  initEvents() {
    const t = U;
    let e = this[t(277)], n = e.handlerLayer.render.canvas;
    bl[t(338)](function(r) {
      const i = t;
      ze[i(334)](n, r, function(o) {
        const a = i;
        e[a(318)][a(335)](o);
      });
    });
  }
  _initObserve() {
    const t = U, e = this, n = this.stage;
    e.eventObservable.filter((r) => {
      const i = $s;
      if (n[i(313)] == Jt.view || n.camera.localView.mode == "painted")
        return !1;
      if (n.mode == Jt.drag)
        return !0;
      if (e.preMouseoverTarget = e.mouseoverTarget, e[i(288)] = null, r[i(298)] == "pointerdown") {
        if (n.handlerLayer._pickUp() == null) {
          let o = n._pickUpViewLayers();
          o == null ? e._clearTarget() : e[i(326)](o);
        }
        return !0;
      }
      if (r.type == "pointermove" && r.buttons <= 0) {
        let o = n._pickUpViewLayers();
        e.mouseoverTarget = o;
      }
      return !0;
    })[t(292)]((r) => {
      const i = t;
      let o = r[i(298)];
      if (n[i(313)] == Jt.edit && n.editor != null) {
        let a = o + "Handler";
        if (n.editor[a] && (n[i(322)][a](r), r[i(297)]))
          return !1;
      }
      return !0;
    }).subscribe((r) => {
      let i = r.type + "Handler";
      n[i] && n[i](r), n.overview && (n.overview.dirty = !0);
    }), e[t(291)].subscribe((r) => {
      r[t(297)] || (e.dispatchEvent(r), r.type == "wheel" && r.preventDefault());
    });
  }
  [U(303)](t, e) {
    const n = U, r = this[n(309)];
    r.type = this[n(298)], r.x = this.x, r.y = this.y, r.isDraging = this[n(281)], r.isPointDown = this[n(327)], r.isPointerOn = this.isPointerOn, r.isDragStart = this.isDragStart, r[n(299)] = this.isDragEnd, r.timeStamp = this.timeStamp, r.dx = this.dx, r.dy = this.dy, r.xInWorld = this.xInWorld, r.yInWorld = this[n(325)], r.dxInWorld = this.dxInWorld, r.dyInWorld = this.dyInWorld, this[n(330)] = t, this[n(278)] = t[n(278)], this.type = e, this[n(299)] = !1, this.isIdle = !1;
    let i = this;
    this._idleTimer != null && window.clearTimeout(this[n(316)]), this._idleTimer = setTimeout(function() {
      i[n(333)] = !0;
    }, this.idleTimeout);
  }
  [U(323)](t, e) {
    const n = U;
    this[n(303)](t, e), this[n(275)] = e !== n(332) && t.offsetX > 0 && t.offsetY > 0;
    const r = this[n(309)];
    this.x = t.offsetX, this.y = t.offsetY, e == n(290) ? (this.isPointerDown = !0, this[n(315)] = this.x, this[n(308)] = this.y, this.buttons = t[n(289)], this.button = t.button, this.isRightButton = t.button == 2) : (e == n(284) || e == "pointerout") && (this[n(327)] = !1, r.type == n(285) && (this.isDragEnd = !0)), this.isDraging = this.isPointerDown == 1 && (e == "pointermove" || e == "wheel" || e == "pointerenter" || e == "pointerout"), this[n(287)] = this.isDraging && r[n(281)] != 1, this.dx = this.x - r.x, this.dy = this.y - r.y;
    let i = this.stage[n(331)].toWorldXY(this.x, this.y);
    this.xInWorld = i.x, this.yInWorld = i.y, this.dxInWorld = this.dx / this.stage.camera.scale, this.dyInWorld = this.dy / this[n(277)].camera.scale;
  }
  _onEvent(t) {
    const e = U, n = t.type;
    t instanceof PointerEvent && n !== e(296) && !t[e(324)] || (Il && t instanceof TouchEvent ? this.touchWheel.onTouch(t, this.stage) : (this.stage.handlerLayer[e(317)][e(311)].title = "", this._updatePointerInfo(t, n), this.eventObservable[e(302)](t)));
  }
  pickObject(t) {
    const e = U, n = this.stage, r = this;
    let i = r.event || { type: e(290), ctrlKey: !1, metaKey: !1 };
    if (t == null)
      return;
    t._matrixDirty = !0, r[e(298)] == "pointerdown" && t[e(286)][e(328)](t, r);
    const o = i.ctrlKey || i.metaKey;
    n.selectedGroup.has(t) ? o && n[e(314)].remove(t) : (!o && n[e(314)].removeAll(), n.selectedGroup.add(t));
  }
  [U(326)](t) {
    this.preTarget = this.target, this.target = t;
  }
  _clearTarget() {
    const t = U;
    this.target != null && this.target[t(320)](), this[t(321)] = null;
  }
  _mouseEventForwardToCanvas(t) {
    const e = U;
    let n = this.event;
    n instanceof PointerEvent && t[e(295)](function(r, i, o) {
      const a = U, h = new MouseEvent(r.type, { view: r[a(312)], bubbles: !0, cancelable: r.cancelable, clientX: r.clientX, clientY: r.clientY });
      return i == null && (i = r.offsetX), o == null && (o = r[a(307)]), Object.defineProperty(h, "offsetX", { get: function() {
        return i;
      } }), Object[a(336)](h, "offsetY", { get: function() {
        return o;
      } }), h;
    }(n));
  }
  preventDefault() {
    const t = U;
    this.event && this.event[t(301)]();
  }
  [U(334)](t, e) {
    return super[U(334)](t, e);
  }
  hasListener(t) {
    return super.hasListener(t);
  }
  reset() {
    const t = U;
    this.idleTimeout = 50, this.target = null, this.preTarget = null, this[t(288)] = null, this.preMouseoverTarget = null, this.dropTarget = null, this.buttons = 0, this.button = 0, this.pointerDownX = 0, this.pointerDownY = 0, this.x = -1, this.y = -1, this.dx = 0, this.dy = 0, this.xInWorld = 0, this[t(325)] = 0, this.dxInWorld = 0, this.dyInWorld = 0, this.button = 0, this.event = null, this.previous = { type: "pointerenter", x: 0, y: 0, dx: 0, dy: 0, xInWorld: 0, yInWorld: 0, dxInWorld: 0, dyInWorld: 0, isDraging: !1, isPointDown: !1, isPointerOn: !1, isDragStart: !1, isDragEnd: !1, timeStamp: 0 }, this.isPointerDown = !1, this.isRightButton = !1, this[t(299)] = !1, this[t(281)] = !1, this[t(275)] = !1, this.isDragStart = !1, this.isIdle = !0, this[t(278)] = 0, clearTimeout(this._idleTimer), this._idleTimer = null;
  }
}
function tr(s, t) {
  const e = mo();
  return (tr = function(n, r) {
    return e[n -= 344];
  })(s, t);
}
let Ln;
function Wr(s) {
  const t = tr;
  let e = new KeyboardEvent(s.type, s), n = e.preventDefault;
  if (e[t(357)] = function() {
    s[t(357)](), n.call(this);
  }, e[t(344)] = Ln, Ln) {
    const r = s.key == Ln[t(359)];
    let i = e.time - Ln.time;
    r && i < 400 && (e[t(353)] = !0);
  }
  return Ln = e, e;
}
function wl(s, t) {
  let e = {};
  t instanceof WheelEvent ? e = new WheelEvent(s, t) : window.DragEvent && t instanceof window.DragEvent ? e = new DragEvent(s, t) : t instanceof MouseEvent ? e = new MouseEvent(s, t) : t instanceof TouchEvent && (e = new TouchEvent(s, t));
  let n = e.preventDefault;
  return e.preventDefault = function() {
    const r = tr;
    t.preventDefault(), n[r(352)](this);
  }, e.raw = t, e;
}
function mo() {
  const s = ["14388oPqmKO", "152KpObFy", "2201416baHvqn", "preventDefault", "104493ZPBHaZ", "key", "previous", "132652SVYYLw", "26RCxpMe", "2806176zhdXrR", "16MmMDnK", "221049PqDCFL", "506395lRKRhR", "6280FNYSQL", "call", "isDouble"];
  return (mo = function() {
    return s;
  })();
}
(function() {
  const s = tr, t = mo();
  for (; ; )
    try {
      if (-parseInt(s(345)) / 1 + -parseInt(s(346)) / 2 * (-parseInt(s(358)) / 3) + parseInt(s(348)) / 4 * (parseInt(s(350)) / 5) + -parseInt(s(347)) / 6 + -parseInt(s(356)) / 7 + -parseInt(s(355)) / 8 * (parseInt(s(349)) / 9) + -parseInt(s(351)) / 10 * (-parseInt(s(354)) / 11) === 297848)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
let vl = class {
  constructor(s) {
    this.type = s;
  }
};
const q = er;
function er(s, t) {
  const e = xo();
  return (er = function(n, r) {
    return e[n -= 497];
  })(s, t);
}
(function() {
  const s = er, t = xo();
  for (; ; )
    try {
      if (parseInt(s(503)) / 1 + -parseInt(s(514)) / 2 * (parseInt(s(521)) / 3) + parseInt(s(552)) / 4 * (-parseInt(s(543)) / 5) + parseInt(s(497)) / 6 + -parseInt(s(550)) / 7 * (parseInt(s(508)) / 8) + parseInt(s(506)) / 9 * (-parseInt(s(505)) / 10) + parseInt(s(533)) / 11 === 479808)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class gh extends we {
  constructor(t) {
    const e = er;
    super(), this.debug = !1, this.disabled = !1, this[e(500)] = /* @__PURE__ */ new Map(), this.keyMap = /* @__PURE__ */ new Map(), this[e(501)] = t, this.init(), this.debug = !1;
  }
  [q(548)]() {
    this.disabled = !0;
  }
  [q(538)]() {
    this.disabled = !1;
  }
  [q(549)]() {
    const t = q;
    return this[t(522)](t(535));
  }
  [q(502)]() {
    const t = q;
    return this.isKeydown(t(542));
  }
  [q(529)]() {
    return this.isKeydown("Alt");
  }
  [q(537)]() {
    return this.isKeydown("Meta");
  }
  bindKey(t, e) {
    const n = q;
    let r = t.toLowerCase()[n(519)]("+").sort().join("+");
    this.regMap[n(554)](r, e);
  }
  [q(511)](t) {
    return this.getKeyBinding(t) != null;
  }
  [q(540)](t) {
    const e = q;
    let n = t[e(513)]().split("+")[e(518)]()[e(504)]("+");
    return this.regMap.get(n);
  }
  [q(551)](t) {
    const e = q;
    let n = t[e(513)]().split("+")[e(518)]().join("+");
    this[e(500)].delete(n);
  }
  [q(522)](t) {
    const e = q;
    return this[e(526)][e(530)](t.toLowerCase());
  }
  sendKey(t, e) {
    const n = q;
    e == null && ((e = new KeyboardEvent("keydown"))[n(531)] = !0), this[n(527)](t[n(513)]().split("+"), e, !0);
  }
  checkValid() {
    const t = q;
    let e = document[t(556)][t(547)];
    return !this.disabled && e != "INPUT" && e != t(516);
  }
  fireKey(t, e, n) {
    const r = q;
    if (n == 0)
      return;
    const i = this;
    let o = this[r(501)][r(532)], a = t.sort()[r(504)]("+")[r(513)]();
    this[r(545)] && console[r(507)]("按下", a);
    let h = this.regMap[r(555)]();
    for (let l of h) {
      if (l != a || o != null && o[r(539)] == 1)
        continue;
      e[r(499)]();
      let c = i.regMap.get(l);
      c && c(e);
    }
  }
  keydownHandler(t) {
    const e = q;
    let n = t.key.toLowerCase(), r = this.stage, i = [];
    t.ctrlKey && (this.keyMap[e(554)]("control", !0), i.push("control")), t[e(512)] && (this[e(526)].set("alt", !0), i[e(515)](e(528))), t[e(553)] && (this[e(526)][e(554)]("shift", !0), i.push("shift")), t[e(524)] && (this[e(526)].set("meta", !0), i[e(515)](e(525))), i[e(534)](n) == -1 && i[e(515)](n), this[e(526)].set(n, !0);
    let o = Wr(t);
    this.fireKey(i, o, r[e(510)].isPointerOn), this.dispatchEvent(o);
  }
  keyupHandler(t) {
    const e = q, n = this, r = t.key.toLowerCase();
    n.keyMap.delete(r);
    let i = n.stage.editor;
    if (i != null && i.textInputMode == 1)
      return;
    let o = Wr(t);
    n[e(498)](o);
  }
  init() {
    const t = q;
    let e = this, n = Ne[t(544)](document, t(541)), r = Ne.fromEvent(document, "keyup"), i = n.filter(() => this[t(509)]()), o = r[t(520)](() => this.checkValid());
    i.subscribe((a) => {
      e.keydownHandler(a);
    }), o[t(546)]((a) => {
      e.keyupHandler(a);
    }), this.keydownOb = i, this.keyupOb = o, this.keyBufferOb = i.map((a) => a.key)[t(517)](2, 1)[t(536)]((a) => a[0] + "" + a[1]);
  }
  addEventListener(t, e) {
    return super.addEventListener(t, e);
  }
  removeEventListener(t, e) {
    return super.removeEventListener(t, e);
  }
  hasListener(t) {
    return super[q(523)](t);
  }
}
function xo() {
  const s = ["altKey", "toLowerCase", "945822ODBRPB", "push", "TEXTAREA", "bufferCount", "sort", "split", "filter", "3Cyrngu", "isKeydown", "hasListener", "metaKey", "meta", "keyMap", "fireKey", "alt", "isAltDown", "get", "mock", "editor", "18011279GNdAVR", "indexOf", "Control", "map", "isMetaDown", "enable", "textInputMode", "getKeyBinding", "keydown", "Shift", "809270JnDeRQ", "fromEvent", "debug", "subscribe", "tagName", "disable", "isControlDown", "3269Yzclft", "unbind", "16lwWKMM", "shiftKey", "set", "keys", "activeElement", "4309764WoPBKz", "dispatchEvent", "preventDefault", "regMap", "stage", "isShiftDown", "266707HdppBk", "join", "10McSjVH", "3509433uxqLAc", "log", "10832hpQzyE", "checkValid", "inputSystem", "isKeyRegistered"];
  return (xo = function() {
    return s;
  })();
}
function Io() {
  var s = ["rgba(0,255,0, 0.9)", "73512qsNQzR", "styleX", "6DryyaH", "visible", "20510hAuLGd", "155340eYTpOX", "2865082MwMGhU", "56euebzX", "right", "12px arial", "rgba(0,255,0, 0.5)", "4833dsSwGm", "3cSYver", "231356tuuMjd", "rgba(255,0,0,0.9)", "810LcrhCA", "lineDashScale", "2490383vKTmNh"];
  return (Io = function() {
    return s;
  })();
}
function bo(s, t) {
  var e = Io();
  return (bo = function(n, r) {
    return e[n -= 493];
  })(s, t);
}
(function() {
  for (var s = bo, t = Io(); ; )
    try {
      if (-parseInt(s(498)) / 1 * (-parseInt(s(499)) / 2) + -parseInt(s(510)) / 3 + -parseInt(s(493)) / 4 * (parseInt(s(509)) / 5) + parseInt(s(507)) / 6 * (-parseInt(s(503)) / 7) + parseInt(s(505)) / 8 + parseInt(s(497)) / 9 * (parseInt(s(501)) / 10) + parseInt(s(511)) / 11 === 195205)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class yh {
  constructor() {
    var t = bo;
    this[t(508)] = !1, this[t(502)] = 1, this[t(506)] = new Ut({ strokeStyle: "rgba(255,0,0,0.5)", fillStyle: t(500), textAlign: t(494), textBaseline: "top", lineWidth: 1, font: "12px arial" }), this.styleY = new Ut({ strokeStyle: t(496), fillStyle: t(504), textBaseline: "bottom", lineWidth: 1, font: t(495) });
  }
  show() {
    this.visible = !0;
  }
  hide() {
    this.visible = !1;
  }
}
var Ie = nr;
(function() {
  for (var s = nr, t = wo(); ; )
    try {
      if (-parseInt(s(391)) / 1 + -parseInt(s(388)) / 2 + -parseInt(s(394)) / 3 + -parseInt(s(396)) / 4 * (-parseInt(s(395)) / 5) + parseInt(s(386)) / 6 + parseInt(s(392)) / 7 * (parseInt(s(385)) / 8) + parseInt(s(387)) / 9 === 230438)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var _l = Object.defineProperty, Sl = Object[Ie(393)], Wa = (s, t, e, n) => {
  for (var r, i = Ie, o = n > 1 ? void 0 : n ? Sl(t, e) : t, a = s[i(389)] - 1; a >= 0; a--)
    (r = s[a]) && (o = (n ? r(t, e, o) : r(o)) || o);
  return n && o && _l(t, e, o), o;
};
function nr(s, t) {
  var e = wo();
  return (nr = function(n, r) {
    return e[n -= 385];
  })(s, t);
}
function wo() {
  var s = ["play", "removeFromParent", "pause", "1808KusCFt", "1134690UvQsnZ", "1222641ydTMAf", "415812wbjxfK", "length", "animations", "234184inoVUe", "11963JhYUKq", "getOwnPropertyDescriptor", "1126548nQEqtv", "27165GoKDGO", "248YeBrSG", "cancel", "_serializers", "concat"];
  return (wo = function() {
    return s;
  })();
}
class $n extends C {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(t, e, n, r, i), this.aeOptions = {}, this.animations = [];
  }
  [Ie(402)]() {
    this.animationSystem && this.animations.forEach((t, e) => {
      t[nr(397)]();
    });
  }
  [Ie(400)]() {
    this.animationSystem && this.animations.forEach((t, e) => {
      t.play();
    });
  }
  [Ie(401)]() {
    return super.removeFromParent(), this.animationSystem && this.animationSystem.removeAENode(this), this;
  }
  destroy() {
    var t = Ie;
    super.destroy(), this.aeOptions = null, this[t(390)] = null, this.animationSystem = null;
  }
}
Wa([p("AENode")], $n.prototype, "className", 2), Wa([p(C.prototype[Ie(398)][Ie(399)](["aeOptions"]))], $n.prototype, Ie(398), 2);
const Et = ts;
function vo() {
  const s = ["3209346IPwdlm", "width", "40molPhS", "</g></svg>", "readAsDataURL", "replace", "createElement", "#242424", "11sNizLa", "4178910mSYQhH", "53299wEDOdY", "' height='", "onloadend", "25293aatCfw", "7726104VIrsXc", "data", "485dcQAta", "533151qRBTll", "<path d='", "652RNHCNG", "startsWith", "svgToImage", " : ", "canvas", "colorFilter", "#151515", "ctx", "2nlLfpw", "bgGrid", "loadAndConvertImage", " H ", "onerror", "status", "39036BkwzPH", "height", "getContext", "createGridImage"];
  return (vo = function() {
    return s;
  })();
}
function ts(s, t) {
  const e = vo();
  return (ts = function(n, r) {
    return e[n -= 166];
  })(s, t);
}
(function() {
  const s = ts, t = vo();
  for (; ; )
    try {
      if (parseInt(s(175)) / 1 * (parseInt(s(192)) / 2) + parseInt(s(178)) / 3 * (parseInt(s(184)) / 4) + parseInt(s(181)) / 5 * (-parseInt(s(198)) / 6) + parseInt(s(202)) / 7 + -parseInt(s(167)) / 8 * (parseInt(s(182)) / 9) + -parseInt(s(174)) / 10 * (-parseInt(s(173)) / 11) + -parseInt(s(179)) / 12 === 732802)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Ra = document[Et(171)]("canvas"), Rr = class Xt {
  static bgGrid(t, e, n, r, i = Et(172), o = Et(190)) {
    const a = Et;
    let h = "<svg width='" + t + a(176) + e + `' xmlns='http://www.w3.org/2000/svg'>
<rect x='0' y='0' width='` + t + a(176) + e + "' style='fill:" + i + ";stroke:" + o + `;stroke-width:1;'/>
<g style='stroke:` + o + "; stroke-width:0.5;'>", l = e / n, c = t / r, u = "";
    for (let f = 1; f <= n; f++)
      u += "M 0 " + l * f + a(195) + t + " ";
    h += a(183) + u + "'/>";
    let d = "";
    for (let f = 1; f <= r; f++)
      d += "M " + c * f + " 0 V " + e + " ";
    return h += "<path d='" + d + "'/>", h += a(168), h = h[a(170)](/\n/g, ""), h;
  }
  static createGridImage(t, e, n, r, i, o) {
    let a = Xt[Et(193)](t, e, n, r, i, o);
    return 'url("' + Xt.svgToImageUrl(a) + '")';
  }
  static createLightGridImg(t, e) {
    return Xt.createGridImage(100, 100, 4, 4, t, e);
  }
  static createDarkGridImg(t, e) {
    return Xt[Et(201)](100, 100, 4, 4, t, e);
  }
  static svgToImageUrl(t) {
    return "data:image/svg+xml;base64," + btoa(unescape(encodeURIComponent(t)));
  }
  static [Et(186)](t) {
    let e = new Image();
    return e.src = Xt.svgToImageUrl(t), e;
  }
  static canvasColorFilter(t, e) {
    const n = Et, r = t.getContext("2d"), i = r.getImageData(0, 0, t.width, t[n(199)]);
    let o = (a, h, l, c) => [e[0] * a / 255, e[1] * h / 255, e[2] * l / 255];
    typeof e == "function" && (o = e);
    for (let a = 0; a < i[n(180)].length; a += 4) {
      let h = o(i.data[a], i[n(180)][a + 1], i.data[a + 2], i.data[a + 3]);
      i.data[a] = h[0], i.data[a + 1] = h[1], i.data[a + 2] = h[2], h.length > 3 && h[3] != null && (i.data[a + 3] = h[3]);
    }
    r.putImageData(i, 0, 0);
  }
  static [Et(189)](t, e) {
    const n = Et, r = Xt.canvas, i = Xt[n(191)];
    r.width = t.width, r.height = t.height, i.drawImage(t, 0, 0), Xt.canvasColorFilter(r, e);
    const o = new Image();
    return o.src = r.toDataURL("image/png"), o;
  }
  static imageToBase64(t) {
    const e = Et, n = Xt[e(188)], r = Xt.ctx;
    return n.width = t[e(166)], n[e(199)] = t.height, r.drawImage(t, 0, 0), n.toDataURL();
  }
  static parseImgUrl(t) {
    const e = Et;
    if (t.startsWith("data:image/"))
      return t;
    if (t[e(185)]("url(")) {
      let n = t.match(/url\((['"]?)(.*?)\1\)/);
      if (n)
        return n[2];
      throw new Error("Image url error: " + t);
    }
    return "";
  }
  static loadAndConvertImage(t) {
    return new Promise((e, n) => {
      try {
        if (t.startsWith("data:image/"))
          return void e(t);
        fetch(t).then((r) => {
          const i = ts;
          if (!r.ok)
            throw new Error("HTTP error! status: " + r[i(197)] + i(187) + t);
          return r.blob();
        }).then((r) => {
          const i = ts, o = new FileReader();
          o[i(177)] = function() {
            const a = o.result;
            e(a);
          }, o[i(196)] = function() {
            n(new Error("file reader error:" + t));
          }, o[i(169)](r);
        });
      } catch (r) {
        n(r);
      }
    });
  }
  static batchLoadAndConvertImages(t) {
    const e = Et, n = t.map((r) => Xt[e(194)](r));
    return Promise.all(n);
  }
};
Rr.canvas = Ra, Rr.ctx = Ra[Et(200)]("2d", { willReadFrequently: !0 });
let Hn = Rr;
function mh(s, t) {
  var e = _o();
  return (mh = function(n, r) {
    return e[n -= 280];
  })(s, t);
}
(function() {
  for (var s = mh, t = _o(); ; )
    try {
      if (-parseInt(s(288)) / 1 * (-parseInt(s(284)) / 2) + -parseInt(s(283)) / 3 * (-parseInt(s(286)) / 4) + -parseInt(s(282)) / 5 + parseInt(s(289)) / 6 + -parseInt(s(285)) / 7 + -parseInt(s(281)) / 8 * (-parseInt(s(287)) / 9) + -parseInt(s(280)) / 10 === 662514)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class kl extends we {
  constructor() {
    super(), this.stoped = !1;
  }
  dispose() {
  }
}
function _o() {
  var s = ["38331evwEkF", "1OzswfI", "1960518dAuoYj", "8766540hEolRz", "1928xdagOD", "5273165oVEOVV", "1956stwGIo", "2470318lfICCt", "1577366QoqCNt", "1416NqcTHr"];
  return (_o = function() {
    return s;
  })();
}
const Kt = dn;
function So() {
  const s = ["4235478HpVybF", "4319IvfSpr", "toDataURL", "canvas", "shadowColor", "draw", "27kmniKp", "LinkSelectedStyle", "2211nZyXDU", "rect", "parent", "beginPath", "6552fZSAOs", "2795368dCzHSM", "128cmrMrh", "assign", "cursor", "87290fuuiMA", "destroyed", "getContext", "save", "width", "378418QLICGI", "14670UiSSok", "borderColor", "roundRect", "createElement", "moveTo", "lineTo", "height", "clearAll", "2okKrWV", "paintSelected", "none", "39VdOnnH", "lineDash", "transform", "6160776FyzYKv", "context"];
  return (So = function() {
    return s;
  })();
}
function dn(s, t) {
  const e = So();
  return (dn = function(n, r) {
    return e[n -= 314];
  })(s, t);
}
(function() {
  const s = dn, t = So();
  for (; ; )
    try {
      if (-parseInt(s(317)) / 1 * (-parseInt(s(347)) / 2) + parseInt(s(325)) / 3 + -parseInt(s(339)) / 4 * (-parseInt(s(342)) / 5) + -parseInt(s(337)) / 6 * (-parseInt(s(326)) / 7) + -parseInt(s(338)) / 8 * (parseInt(s(331)) / 9) + -parseInt(s(348)) / 10 * (-parseInt(s(333)) / 11) + parseInt(s(323)) / 12 * (-parseInt(s(320)) / 13) === 729074)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class xh extends kl {
  constructor() {
    const t = dn;
    super(), this[t(343)] = !1;
    const e = document[t(351)](t(328));
    this.canvas = e, Object[t(340)](e.style, { position: "absolute", touchAction: t(319) }), this.context = e[t(344)]("2d"), window.devicePixelRatio && this.context.scale(window.devicePixelRatio, window.devicePixelRatio), this.contextExtends();
  }
  _paintFlattenObjects(t, e) {
    const n = dn;
    let r = this[n(324)];
    for (let i = 0; i < t.length; i++) {
      let o = t[i];
      if (r[n(345)](), o instanceof C) {
        let a = o._worldTransform.m;
        r.transform(a[0], a[1], a[2], a[3], a[4], a[5]);
      } else if (!(o.parent instanceof ct)) {
        let a = o[n(335)]._worldTransform.m;
        r[n(322)](a[0], a[1], a[2], a[3], a[4], a[5]);
      }
      this.paint(o, e), r.restore();
    }
  }
  paint(t, e) {
    const n = dn;
    let r = this.context, i = t.isSelected && t.showSelected == 1 && e !== null;
    i && (r[n(345)](), this.paintSelected(t, e)), t[n(330)](r), i && r.restore();
  }
  [Kt(318)](t, e) {
    const n = Kt;
    let r = this.context;
    if (t instanceof C) {
      let i = t.selectedStyle || e.currentTheme.getStyle("NodeSelectedStyle");
      if (i.borderWidth > 0) {
        r[n(345)](), r.beginPath();
        let o = i.borderWidth;
        i[n(321)] != null && r.setLineDash(i.lineDash), i[n(349)] != null && (r.strokeStyle = i[n(349)]), r.lineWidth = o;
        let a = t.width + 2 * o, h = t[n(315)] + 2 * o;
        r[n(334)](0.5 * -a, 0.5 * -h, a, h), r.stroke(), r.closePath(), r.restore();
      } else
        Object[n(340)](r, i);
    } else {
      let i = e.currentTheme.getStyle(n(332));
      i[n(329)] != null && Object.assign(r, i);
    }
  }
  [Kt(316)]() {
    this.clear();
  }
  contextExtends() {
    const t = Kt;
    this.context[t(350)] == null && (this[t(324)][t(350)] = function(e, n, r, i, o) {
      const a = t;
      this[a(336)](), this[a(352)](e + o, n), this.lineTo(e + r - o, n), this.quadraticCurveTo(e + r, n, e + r, n + o), this.lineTo(e + r, n + i - o), this.quadraticCurveTo(e + r, n + i, e + r - o, n + i), this[a(314)](e + o, n + i), this.quadraticCurveTo(e, n + i, e, n + i - o), this[a(314)](e, n + o), this.quadraticCurveTo(e, n, e + o, n), this.closePath();
    });
  }
  show() {
    this.canvas.style.display = "block";
  }
  hide() {
    this.canvas.style.display = "none";
  }
  getWidth() {
    const t = Kt;
    return this[t(328)][t(346)];
  }
  getHeight() {
    const t = Kt;
    return this.canvas[t(315)];
  }
  setSize(t, e) {
    const n = Kt, r = window.devicePixelRatio || 1;
    this.canvas.width = Math.round(t * r), this.canvas[n(315)] = Math.round(e * r), this.canvas.style[n(346)] = t + "px", this.canvas.style.height = e + "px";
  }
  getCursor() {
    const t = Kt;
    return this[t(328)].style[t(341)];
  }
  setCursor(t) {
    this.canvas.style.cursor = t;
  }
  toDataURL(t, e) {
    const n = Kt;
    return t = t || "image/png", this.canvas[n(327)](t, e);
  }
  clear() {
    const t = Kt;
    this.canvas.width = this[t(328)][t(346)];
  }
  dispose() {
    this[Kt(343)] = !0, this.canvas.remove();
  }
}
const On = Po;
function ko() {
  const s = ["35GJAphF", "paintLayer", "748136wWUmVE", "font", "localToWorldXY", "beginPath", "_getAABBWithText", "stroke", "devicePixelRatio", "renderLayer", "549820wpCkEf", "109BSzUqm", "applyTo", "context", "closePath", "stage", "11852802RmNwkj", "object", "pink", "moveTo", "_axis", "lineTo", "1342932cRaTQL", "1087760wiLRlH", "1408vnksmI", "restore", "green", "save", "459450vWYnbJ", "_paintFlattenObjects", "displayList", "localView", "visible"];
  return (ko = function() {
    return s;
  })();
}
function Po(s, t) {
  const e = ko();
  return (Po = function(n, r) {
    return e[n -= 322];
  })(s, t);
}
(function() {
  const s = Po, t = ko();
  for (; ; )
    try {
      if (parseInt(s(349)) / 1 * (parseInt(s(329)) / 2) + -parseInt(s(327)) / 3 + -parseInt(s(328)) / 4 + parseInt(s(348)) / 5 + -parseInt(s(333)) / 6 + parseInt(s(338)) / 7 * (-parseInt(s(340)) / 8) + parseInt(s(354)) / 9 === 239934)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Pl = be.gc;
let Fa = pt.w;
class Ih extends xh {
  constructor() {
    super();
  }
  [On(347)](t) {
    const e = On, n = t[e(353)].styleSystem;
    if (this.clear(), window[e(346)] && window.devicePixelRatio != 1) {
      const i = window.devicePixelRatio;
      this.context.scale(i, i);
    }
    const r = n.currentTheme.getStyle("DefaultConfig");
    Object.assign(this.context, r), t[e(325)][e(337)] && this.paintAxis(t), this[e(339)](t, t.stage.camera), Fn.paintAABB == 1 && t[e(335)] != null && this.paintAABB(t);
    {
      if (Fa == null)
        return;
      let i = this.context;
      i[e(332)](), i.globalAlpha = 0.8, i[e(341)] = "bold 16px arial";
      let o = Pl(Fa);
      i.fillStyle = "gray", i.fillText(o, 14, this.getHeight() - 14), i[e(330)]();
    }
  }
  paintLayer(t, e) {
    const n = On;
    let r = this[n(351)];
    r.save();
    let i = e.getTransform().m;
    return r.transform(i[0], i[1], i[2], i[3], i[4], i[5]), t._computedStyle.applyTo(r), t.displayList.forEach((o) => o.painted = !0), this[n(334)](t.displayList, t.stage.styleSystem), r.restore(), t;
  }
  paintAABB(t) {
    const e = On;
    let n = t[e(353)].camera, r = this.context, i = t.displayList;
    for (let o = i.length - 1; o >= 0; o--) {
      let a = i[o], h = a[e(344)]();
      h = n.toScreenRect(h), r.save(), r.strokeStyle = a instanceof ct ? "rgba(0,0,255,0.3)" : e(a instanceof B ? 323 : 331), r[e(343)](), r.rect(h.x, h.y, h.width, h.height), r.stroke(), r[e(352)](), r.restore();
    }
  }
  paintAxis(t) {
    const e = On, n = t._axis, r = t.stage;
    let i = this.context;
    const o = r.camera[e(336)][e(322)] || t, a = r.width, h = r.height, l = o[e(342)](0, 0), c = r.camera.toScreenXY(l.x, l.y);
    i[e(332)](), c.x > 0 && c.x < a && (i.beginPath(), n.styleY.applyTo(i), i[e(324)](c.x, 0), i.lineTo(c.x, h), i[e(324)](c.x - 5, h - 8), i[e(326)](c.x, h), i[e(326)](c.x + 5, h - 8), i.stroke(), i.fillText("+y", c.x + 6, h - 5)), c.y > 0 && c.y < h && (i.beginPath(), n.styleX[e(350)](i), i[e(324)](0.5 * a, c.y), i.lineTo(0, c.y), i.moveTo(0.5 * a, c.y), i[e(326)](a, c.y), i.moveTo(a - 8, c.y - 5), i[e(326)](a, c.y), i.lineTo(a - 8, c.y + 5), i[e(345)](), i.fillText("+x", a - 5, c.y + 5)), i[e(330)]();
  }
}
const O = xn;
(function() {
  const s = xn, t = Lo();
  for (; ; )
    try {
      if (-parseInt(s(521)) / 1 * (parseInt(s(552)) / 2) + parseInt(s(500)) / 3 + parseInt(s(547)) / 4 + parseInt(s(511)) / 5 + parseInt(s(510)) / 6 + -parseInt(s(553)) / 7 * (-parseInt(s(533)) / 8) + -parseInt(s(487)) / 9 === 626561)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Ll = Object.defineProperty, Ol = Object.getOwnPropertyDescriptor, sn = (s, t, e, n) => {
  const r = xn;
  for (var i, o = n > 1 ? void 0 : n ? Ol(t, e) : t, a = s[r(534)] - 1; a >= 0; a--)
    (i = s[a]) && (o = (n ? i(t, e, o) : i(o)) || o);
  return n && o && Ll(t, e, o), o;
};
function xn(s, t) {
  const e = Lo();
  return (xn = function(n, r) {
    return e[n -= 482];
  })(s, t);
}
const He = class Nn extends at {
  constructor(t) {
    super(), this._renderTimes = 0, this.cuttingHide = !0, this.displayList = [], this._flattenList = [], this._axis = new yh(), this._frames = 0, this._requestReapint = !1, this._bgInfo = { sw: 1, sh: 1, x: 0, y: 0 }, this._displayListDirty = !0, this._treeDirty = !0, this._needUpdateDisplayList = !0, this.ownerLayer = this, this.displayList = [];
    let e = new Ih();
    this._setRender(e), t instanceof lr ? t.addLayer(this) : typeof t == "string" && (this.name = t);
  }
  set background(t) {
    this[xn(507)](t);
  }
  get background() {
    return this._background;
  }
  get frames() {
    return this._frames;
  }
  set frames(t) {
    this._frames = t;
  }
  getRect() {
    const t = xn;
    return new E(0, 0, this.width, this[t(495)]);
  }
  [O(506)](t, e) {
    const n = O;
    this.render[n(504)](t, e);
  }
  [O(497)](t) {
    this.stage = t, this._markAllDirty();
  }
  update() {
    this[O(531)] = !0;
  }
  [O(514)]() {
    const t = O;
    this.setBackground({ background: Hn.createLightGridImg("rgb(255,255,255)", "rgb(240,240,240)") + t(532) });
  }
  useDarkGridBackground() {
    const t = O;
    this.setBackground({ background: Hn.createDarkGridImg(t(518), "rgb(20,20,20)") + " repeat" });
  }
  _setRender(t) {
    const e = O;
    this[e(515)] != null && this[e(515)].dispose(), this[e(515)] = t, this[e(512)] = t[e(512)], this[e(488)](), setTimeout(() => {
      this.canvas.id = "layer_" + this.name;
    }, 100);
  }
  _updateRenderSize(t, e) {
    const n = O;
    (t != this.render.getWidth() || e != this.render.getHeight()) && (this.render.setSize(t, e), this[n(506)](t, e), this.update());
  }
  _pickUpByRect(t) {
    const e = O;
    let n = [];
    if (!this.pointerEnabled)
      return n;
    let r = this[e(543)];
    if (r != null)
      for (let i = 0; i < r.length; i++) {
        let o = r[i], a = o._obb.aabb;
        o[e(556)]() && t[e(503)](a) && n.push(o);
      }
    return n;
  }
  _pickUp(t, e) {
    if (!this.pointerEnabled)
      return null;
    t == null && (t = this.stage.inputSystem.xInWorld), e == null && (e = this.stage.inputSystem.yInWorld);
    for (let n = this.displayList.length - 1; n >= 0; n--) {
      let r = this.displayList[n];
      if (r.pickable() && r.hitTest(t, e)) {
        let i = ls._getTopFrozenParent(r);
        return i ?? r;
      }
    }
    return null;
  }
  _calcBackgroundPosition(t = !1) {
    const e = O;
    if (this[e(558)] == null)
      return;
    const n = this.render.canvas;
    let r = n.style.backgroundRepeat, i = this[e(527)];
    if (i != null && r == e(539)) {
      let o = this._bgInfo, a = i.width, h = i.height, l = this.stage.camera, c = a * l.scale, u = h * l.scale, d = l[e(494)](), f = 0.5 * n.width + d.x, x = 0.5 * n.height + d.y;
      (t || o.sw != c || o.sh != u || o.x != f || o.y != x) && (n.style.backgroundSize = c + "px " + u + "px", n.style.backgroundPosition = f + e(501) + x + "px"), o.sw = c, o.sh = u, o.x = f, o.y = x;
    }
  }
  [O(513)]() {
    const t = O;
    let e = this.stage.camera, n = this[t(509)].filter((i) => i.visible && e.canSee(i));
    if (n.length == 0)
      return new E(0, 0, 1, 1);
    let r = n.map((i) => i._obb.aabb);
    return E[t(544)](r);
  }
  _getExportAABB() {
    const t = O;
    let e = this.stage[t(528)], n = this._flattenList.filter((i) => i.visible && e[t(489)](i));
    if (n.length == 0)
      return new E(0, 0, 1, 1);
    let r = n.map((i) => i._getAABBWithText());
    return E.unionRects(r);
  }
  setZIndex(t) {
    const e = O;
    this[e(525)] = t, this.stage && this.stage[e(491)]();
  }
  get visible() {
    return this._visible;
  }
  set visible(t) {
    const e = O;
    this._visible = t, this._matrixDirty = !0, this[e(515)] && (t == 1 ? this.render[e(519)]() : this.render.hide());
  }
  [O(554)](t) {
  }
  _forceUpdate() {
    const t = O;
    this.visible == 0 || this[t(523)] || this[t(515)].stoped || this[t(515)][t(523)] == 1 || this.stage[t(555)]._tickLayer(this, Date.now());
  }
  _markAllDirty() {
    const t = O;
    this._treeDirty = !0, this.querySelectorAll()[t(508)]((e) => {
      e.style.dirty = !0, e._matrixDirty = !0;
    });
  }
  [O(542)](t) {
    return this.setBackground(t);
  }
  [O(507)](t) {
    const e = O;
    this._background = t;
    const n = this.canvas.style;
    Object.assign(n, t);
    const r = this;
    pt[e(485)](this);
    let i = n.backgroundImage;
    if (i && i[e(534)] > 0 && i !== "initial") {
      let o = Hn.parseImgUrl(i);
      o != "" && pt.loadImageWithObj(this, o, function(a) {
        const h = e;
        r[h(527)] = a, r[h(548)](!0);
      });
    }
    return this[e(548)](!0), this;
  }
  addChild(t) {
    const e = O;
    return super[e(520)](t), this[e(488)](), this;
  }
  addChildren(t) {
    return super.addChildren(t), this.update(), this;
  }
  getAllNodes() {
    return this._findChildren((t) => t.isNode, !0);
  }
  getAllLinks() {
    return this[O(484)]((t) => t.isLink, !0);
  }
  [O(551)](t) {
    return super.querySelectorAll(t);
  }
  querySelector(t) {
    return super.querySelector(t);
  }
  loopRender(t = 60) {
    this[O(546)] = t;
  }
  endLoopRender() {
    this._frames = 0;
  }
  _prepareRenderData() {
    const t = O;
    if (this._needUpdateDisplayList = this._treeDirty || this.stage.camera.isDirty() || this._displayListDirty, this[t(530)])
      return this._flattenList = this[t(493)](this.children, []), void (this._treeDirty = !1);
    for (let e = 0; e < this._flattenList[t(534)]; e++) {
      let n = this._flattenList[e];
      n.parent._matrixDirty && (n[t(505)] = !0), (n._matrixDirty || n.style.dirty == 1) && (this._displayListDirty = !0, Nn._markAllRelativeLinksDirty(this, n, !0)), n._state._attrDirty && (this[t(531)] = !0, n._state._attrDirty = !1), n instanceof $n && n[t(540)] == null && this[t(558)] && this[t(558)][t(540)].addAENode(n);
    }
  }
  [O(493)](t, e) {
    const n = O, r = this;
    for (let i = 0; i < t.length; i++) {
      let o = t[i];
      e.push(o), o.parent[n(505)] && (o._matrixDirty = !0), (o._matrixDirty || o.style[n(486)] == 1) && (this._displayListDirty = !0, Nn._markAllRelativeLinksDirty(r, o, !0)), o[n(482)][n(524)] && (this._requestReapint = !0, o._state[n(524)] = !1), o instanceof $n && o.animationSystem == null && this.stage && this.stage.animationSystem[n(538)](o), o.children.length > 0 && this[n(493)](o.children, e);
    }
    return e;
  }
  static _markAllRelativeLinksDirty(t, e, n = !0) {
    const r = O;
    let i = e[r(550)];
    for (let a = 0; a < i.length; a++) {
      let h = i[a];
      !h._matrixDirty && (h._matrixDirty = !0, n && Nn[r(529)](t, h));
    }
    let o = e[r(549)];
    for (let a = 0; a < o.length; a++) {
      let h = o[a];
      !h._matrixDirty && (h._matrixDirty = !0, n && Nn[r(529)](t, h));
    }
  }
  [O(545)](t, e) {
    return this;
  }
  _getSegmentPoints() {
    return [];
  }
  changeParent(t) {
    return this;
  }
  [O(517)](t) {
  }
  [O(536)]() {
    return [];
  }
  [O(522)](t) {
    const e = O;
    let n = this.style;
    if (t[e(516)].get(n) == null) {
      let r = n.toJSON(t.indexImage);
      if (Object.keys(r).length > 0) {
        let i = t.styles.length;
        t.styleIndexMap.set(n, i), t[e(557)].push(r);
      }
    }
  }
  [O(499)]() {
    const t = O;
    if (this.destroyed)
      throw new Error(t(535));
    this[t(523)] = !0, this.stage && this[t(558)].removeLayer(this), this.render.dispose(), this.displayList = void 0, this._flattenList = void 0, this.listeners = void 0, this.style = void 0, this[t(541)].length = 0, this.render = void 0, this.stage = void 0, this[t(490)].forEach((e) => e.removeFromParent()), this.children[t(534)] = 0;
  }
};
sn([p("Layer")], He[O(537)], O(526), 2), sn([p(!0)], He.prototype, "isLayer", 2), sn([p(Q.MinDeep - 1)], He.prototype, O(492), 2), sn([p([O(526), "isLayer"])], He.prototype, "_allwaysSerializers", 2), sn([p(["id", O(502), "background", O(496), O(483), "pointerEnabled"])], He.prototype, "_serializers", 2), sn([p(O(498))], He[O(537)], "_layerIndex", 2);
let ct = He;
function Lo() {
  const s = ["_zIndex", "className", "_backgroundImageObject", "camera", "_markAllRelativeLinksDirty", "_treeDirty", "_requestReapint", " repeat", "375576gbQXtz", "length", "Layer has been destroyed already.", "_getOBBPoints", "prototype", "addAENode", "repeat", "animationSystem", "classList", "setStyles", "displayList", "unionRects", "translateWith", "_frames", "2749056GrQaVE", "_calcBackgroundPosition", "outLinks", "inLinks", "querySelectorAll", "2DHBnji", "91yhTlSM", "draw", "renderSystem", "pickable", "styles", "stage", "_state", "visible", "_findChildren", "cancelLoadByObject", "dirty", "17813988pIxHvj", "update", "canSee", "children", "updateZIndex", "deep", "_checkAndGetFlattenList", "getOffsetInScreen", "height", "zIndex", "_onMound", "undefined", "destroy", "1933944nUVKpk", "px ", "name", "containsRect", "setSize", "_matrixDirty", "resize", "setBackground", "forEach", "_flattenList", "6761640xoFIdJ", "3920390WYpFrv", "canvas", "getAABB", "useLightGridBackground", "render", "styleIndexMap", "_doTransform", "rgb(36,36,36)", "show", "addChild", "1247348ZiXbMD", "_beforeToJSON", "destroyed", "_attrDirty"];
  return (Lo = function() {
    return s;
  })();
}
const Ct = he;
function Oo() {
  const s = ["updateZIndex", "parent", "swapWithLeft", "796284GKBGcy", "concat", "resizeByFixedPoint", "width", "stage", "872397HJghjQ", "180QGvJkW", "_upgradeParent", "_getAncestors", "726irEWHe", "getNearestPointOnLines", "localToWorldXY", "ownerLayer", "hasBorder", "length", "worldToLocalXY", "rotateAround", "lower", "isDisplayObjectHost", "viewLayers", "sizeFitToChildren", "526050mRnXMg", "getUnionRect", "545NzXRde", "_upgradeLinks", "1108352VKAMrN", "moveToTail", "rotate", "inLinks", "cos", "未来得及更新矩阵", "248080JBHJAk", "10ICvjzX", "setBegin", "push", "unlink", "height", "children", "_shape", "2465968wvNHSw", "_treeDirty"];
  return (Oo = function() {
    return s;
  })();
}
(function() {
  const s = he, t = Oo();
  for (; ; )
    try {
      if (-parseInt(s(463)) / 1 + parseInt(s(446)) / 2 * (parseInt(s(458)) / 3) + -parseInt(s(453)) / 4 + -parseInt(s(437)) / 5 * (-parseInt(s(423)) / 6) + -parseInt(s(439)) / 7 + -parseInt(s(445)) / 8 + -parseInt(s(435)) / 9 * (-parseInt(s(420)) / 10) === 714194)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class ls {
  static _getTopFrozenParent(t) {
    let e = ls[he(422)](t);
    for (let n = 0; n < e.length; n++)
      if (e[n].frozen)
        return e[n];
    return null;
  }
  static _getAncestors(t) {
    const e = he;
    if (t.parent == null)
      return [];
    let n = [];
    for (; t.parent != null; )
      n.push(t.parent), t = t[e(456)];
    return n.reverse();
  }
  static anchorToLocalPoint(t, e) {
    let n = t[he(452)].getConnectionAnchor(e);
    if (n == null)
      throw Error("anchor not exist:" + e);
    return N.calcPointByAnchor(t, n);
  }
  static getNearestPoint(t, e) {
    const n = he;
    if (t instanceof C) {
      if (t._drawContentDesc[n(427)])
        return Yt[n(424)](e.x, e.y, t._obb.points, t._shape.isClosed);
      if (t._obb.points == null && t._matrixDirty)
        throw new Error(n(444));
    }
    return t[n(452)].getIntersect(e.x, e.y, t);
  }
  static unlinks(t, e) {
    const n = he;
    if (t instanceof B)
      return void t[n(449)]();
    let r = t.inLinks;
    r != null && (r.forEach((o) => {
      o[n(456)] != null && (e != null && e.indexOf(o) != -1 || o.setEnd(o.getEndPoint()));
    }), t[n(442)].length = 0);
    let i = t.outLinks;
    i != null && (i.forEach((o) => {
      const a = n;
      o.parent != null && (e != null && e.indexOf(o) != -1 || o[a(447)](o.getBeginPoint()));
    }), t.outLinks[n(428)] = 0);
  }
  static raise(t) {
    const e = he;
    let n;
    t instanceof ct ? t.stage && (n = t.stage.viewLayers) : n = t.parent.children;
    let r = jt.swapWithRight(t, n);
    return r && (t[e(426)] && (t.ownerLayer[e(454)] = !0), t instanceof ct && t.stage && t.stage.updateZIndex()), r;
  }
  static [Ct(431)](t) {
    const e = Ct;
    let n;
    t instanceof ct ? n = t[e(462)].viewLayers : t[e(456)] && (n = t.parent.children);
    let r = jt[e(457)](t, n);
    return r && (t[e(426)] && (t[e(426)][e(454)] = !0), t instanceof ct && t.stage && t.stage.updateZIndex()), r;
  }
  static raiseToTop(t) {
    const e = Ct;
    let n;
    t instanceof ct ? n = t[e(462)][e(433)] : t.parent && (n = t.parent[e(451)]);
    let r = jt[e(440)](t, n);
    return r && (t[e(426)] && (t.ownerLayer[e(454)] = !0), t instanceof ct && t[e(462)] && t.stage[e(455)]()), r;
  }
  static lowerToBottom(t) {
    const e = Ct;
    let n;
    t instanceof ct ? n = t.stage[e(433)] : t[e(456)] && (n = t.parent.children);
    let r = jt.moveToHead(t, n);
    return r && (t[e(426)] && (t.ownerLayer._treeDirty = !0), t instanceof ct && t.stage && t.stage.updateZIndex()), r;
  }
}
function he(s, t) {
  const e = Oo();
  return (he = function(n, r) {
    return e[n -= 420];
  })(s, t);
}
class le {
  static [Ct(460)](t, e, n, r) {
    const i = Ct;
    let o = t._positionToLocalPoint(e);
    t[i(461)] = n, t[i(450)] = r;
    let a = t._positionToLocalPoint(e);
    return t.x -= a.x - o.x, t.y -= a.y - o.y, t;
  }
  static [Ct(430)](t, e, n, r, i) {
    const o = Ct;
    return t.x = e + Math[o(443)](i) * r, t.y = n + Math.sin(i) * r, t.rotation = i, t;
  }
  static rotateAt(t, e, n, r) {
    const i = Ct;
    let o = t.parent || t, a = t[i(425)](e, n), h = o[i(429)](a.x, a.y);
    t[i(441)](r), t.updateMatrix(), a = t[i(425)](e, n);
    let l = o[i(429)](a.x, a.y), c = h.x - l.x, u = h.y - l.y;
    return t.x += c, t.y += u, t.updateMatrix(), t;
  }
  static [Ct(438)](t) {
    return t.getLinks().filter((e) => e[he(421)]() != null);
  }
  static getUnionRect(t) {
    let e = t[0].getRect();
    for (let n = 1; n < t.length; n++)
      e = E.union(e, t[n].getRect());
    return e;
  }
  static setXYButChildFixed(t, e, n) {
    let r = t.children;
    t.x += e, t.y += n;
    for (let i = 0; i < r.length; i++) {
      const o = r[i];
      o instanceof C && (o.x -= e, o.y -= n);
    }
  }
  static [Ct(434)](t, e) {
    const n = Ct;
    let r = t.children;
    if (r.length == 0)
      return;
    let i = le[n(436)](r);
    e == null && (e = 0);
    let o = 2 * e;
    t.resize(i.width + o, i[n(450)] + o);
    let a = i.x + t.width / 2, h = i.y + t.height / 2;
    le.setXYButChildFixed(t, a - e, h - e);
  }
  static translateNodesCenterTo(t, e, n) {
    let r = e, i = n, o = [];
    o = o[Ct(459)](t);
    let a = le.getUnionRect(o).getCenter(), h = r - a.x, l = i - a.y;
    o.forEach((c) => {
      c.translateWith(h, l);
    });
  }
  static travel(t, e, n = null, r = null) {
    const i = Ct;
    if (r == null)
      r = [];
    else if (r.includes(t))
      return null;
    if (e && e(t, n), r[i(448)](t), t instanceof C) {
      let o = t.outLinks;
      if (o != null)
        for (let a = 0; a < o.length; a++) {
          let h = o[a];
          le.travel(h, e, t, r);
        }
    } else
      t instanceof B && t.end[i(432)]() && le.travel(t.end.host, e, n, r);
    return r;
  }
}
function Eo() {
  const s = ["48071367uatkOt", "resize", "translateWith", "updateXY", "min", "4678GslOER", "height", "1539808LLmToa", "rotation", "objects", "anime", "173MWgPup", "4435197Mrjvvq", "8393556XAwrjU", "4916vlakye", "scaleY", "normalizePoints", "translate", "3060ZGpXdW", "positions", "9918104VEJOWz"];
  return (Eo = function() {
    return s;
  })();
}
const Re = sr;
function sr(s, t) {
  const e = Eo();
  return (sr = function(n, r) {
    return e[n -= 253];
  })(s, t);
}
(function() {
  const s = sr, t = Eo();
  for (; ; )
    try {
      if (parseInt(s(266)) / 1 * (parseInt(s(260)) / 2) + -parseInt(s(267)) / 3 + -parseInt(s(269)) / 4 * (parseInt(s(273)) / 5) + -parseInt(s(268)) / 6 + -parseInt(s(254)) / 7 + parseInt(s(262)) / 8 + parseInt(s(255)) / 9 === 892041)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Ts {
  constructor(t, e) {
    const n = sr;
    this.x = 0, this.y = 0, this.scaleX = 1, this.scaleY = 1, this.width = 1, this.height = 1, this[n(263)] = 0, this.objects = t, this[n(253)] = e, this.positionNormals = ot[n(271)](e);
    let r = ot.getBoundingBox(e);
    this.width = r.width, this.height = r.height;
  }
  [Re(256)](t, e) {
    return this.width = t, this.height = e, this;
  }
  resizeWith(t, e) {
    return this.width += t, this.height += e, this;
  }
  [Re(272)](t, e) {
    return this.x = t, this.y = e, this;
  }
  [Re(257)](t, e) {
    return this.x += t, this.y += e, this;
  }
  scale(t, e) {
    return this.scaleX = t, this.scaleY = e, this;
  }
  scaleBy(t, e) {
    this.scaleX *= t, this.scaleY *= e, this.resize;
  }
  rotate(t) {
    return this.rotation = t, this;
  }
  rotateWith(t) {
    return this[Re(263)] += t, this;
  }
  [Re(258)](t) {
    const e = Re, n = this.objects;
    let r = Math[e(259)](t.length, n.length);
    for (let i = 0; i < r; i++) {
      let o = t[i];
      n[i].setXY(o.x, o.y);
    }
  }
  doLayout(t) {
    const e = Re;
    let n = this, r = this[e(264)], i = this.positionNormals;
    if (i = i.map((o) => {
      const a = e;
      let h = { x: 0.5 * n.width * o.x * n.scaleX + n.x, y: 0.5 * n[a(261)] * o.y * n[a(270)] + n.y };
      return (this.rotation !== 0 || this.rotation % 6.283185307179586 != 0) && (h = A.rotate(h.x, h.y, n.x, n.y, this.rotation)), h;
    }), t != null) {
      let o = function(l) {
        return n.updateXY(l);
      }, a = r.map((l) => ({ x: l.x, y: l.y })), h = Object.assign({ from: a, to: i, update: o }, t);
      this.animationSystem[e(265)](h).play();
    } else
      this.updateXY(i);
    return this;
  }
}
function To(s, t) {
  const e = Co();
  return (To = function(n, r) {
    return e[n -= 115];
  })(s, t);
}
function Co() {
  const s = ["height", "212452xiRelM", "children", "level", "1405464xYymdP", "pow", "14aHnrMm", "404710XoieIW", "16ZUrmUZ", "max", "284994lZCBPi", "55888fQNKii", "set", "252675SWkxcc", "translate", "min", "length", "get", "300BuLlGZ", "forEach", "364464dbOEEG"];
  return (Co = function() {
    return s;
  })();
}
function Do(s, t) {
  const e = Ao();
  return (Do = function(n, r) {
    return e[n -= 104];
  })(s, t);
}
function Ao() {
  const s = ["69135370yIdCAE", "155DEfwYM", "children", "7552056RlljmT", "2013680WpkKjJ", "7mZxNQY", "allVirtualNodes", "180294nhBSIl", "object", "max", "92205Shqals", "height", "forEach", "2985171rCJYPQ", "root", "length", "subtreeWidth", "8025363mKNvxM", "36UBXpTx"];
  return (Ao = function() {
    return s;
  })();
}
(function() {
  const s = To, t = Co();
  for (; ; )
    try {
      if (parseInt(s(130)) / 1 + parseInt(s(119)) / 2 + -parseInt(s(118)) / 3 + -parseInt(s(116)) / 4 * (parseInt(s(115)) / 5) + parseInt(s(133)) / 6 * (-parseInt(s(135)) / 7) + parseInt(s(128)) / 8 + -parseInt(s(121)) / 9 * (-parseInt(s(126)) / 10) === 240950)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})(), function() {
  const s = Do, t = Ao();
  for (; ; )
    try {
      if (-parseInt(s(121)) / 1 * (parseInt(s(110)) / 2) + -parseInt(s(105)) / 3 + -parseInt(s(115)) / 4 + parseInt(s(112)) / 5 * (-parseInt(s(118)) / 6) + -parseInt(s(116)) / 7 * (parseInt(s(114)) / 8) + -parseInt(s(109)) / 9 + parseInt(s(111)) / 10 === 988137)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
}();
const En = rr;
function No() {
  const s = ["isTree", "filter", "1UcMdQJ", "pointsLayout", "3662541RXmtGz", "1064550gJCRKc", "444308BWYFRs", "travelNext", "map", "52545GgjZzd", "graphSystem", "1567398YQhCQV", "toTree", "48eRHZDP", "1536056svykjU", "traverse", "animationSystem", "72126VazLgF"];
  return (No = function() {
    return s;
  })();
}
function rr(s, t) {
  const e = No();
  return (rr = function(n, r) {
    return e[n -= 416];
  })(s, t);
}
(function() {
  const s = rr, t = No();
  for (; ; )
    try {
      if (-parseInt(s(425)) / 1 * (-parseInt(s(429)) / 2) + -parseInt(s(422)) / 3 + -parseInt(s(418)) / 4 * (-parseInt(s(432)) / 5) + parseInt(s(428)) / 6 + parseInt(s(416)) / 7 + -parseInt(s(419)) / 8 + -parseInt(s(427)) / 9 === 126603)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class bh {
  constructor(t, e) {
    const n = rr;
    this.animationSystem = t, this[n(433)] = e;
  }
  [En(426)](t, e) {
    const n = En;
    let r = new Ts(t, e);
    return r.animationSystem = this[n(421)], r;
  }
  starLayout(t) {
    const e = En;
    !t.isTree() && (t = mn.createMinimalSpanningTree(t));
    let n = t.traverse(null)[e(424)]((a) => a instanceof pn), r = function(a) {
      const h = To, l = a.root, c = 2 * Math[h(117)](l.object.width, l.object[h(129)]), u = Math.PI / 2;
      return function d(f, x = 0) {
        f.level = x, f.children.forEach((m) => {
          d(m, x + 1);
        });
      }(l), function d(f, x) {
        const m = h, I = x[m(125)](f.level) || 0;
        x[m(120)](f[m(132)], I + 1), f.children.forEach((y) => {
          d(y, x);
        });
      }(l, /* @__PURE__ */ new Map()), function d(f, x, m, I) {
        const y = h, S = Math[y(134)](f[y(132)], 1.5) * c;
        if (f.level === 0) {
          f[y(122)](0, 0);
          const v = 2 * Math.PI / f[y(131)][y(124)];
          f.children[y(127)]((L, w) => {
            d(L, w * v, v);
          });
        } else {
          const v = x + m / 2, L = Math.cos(v) * S, w = Math.sin(v) * S;
          if (f.translate(L, w), f.children.length > 0) {
            const T = Math[y(123)](m / f.children[y(124)], u), R = v - T * (f.children.length - 1) / 2;
            f[y(131)][y(127)]((nt, ve) => {
              d(nt, R + ve * T, T);
            });
          }
        }
      }(l, 0, 2 * Math.PI), a.allVirtualNodes;
    }(this.graphSystem.toTree(t)), i = n[e(431)]((a) => a.object), o = new Ts(i, r);
    return o.animationSystem = this[e(421)], o;
  }
  treeLayout(t) {
    const e = En;
    !t[e(423)]() && (t = mn.createMinimalSpanningTree(t));
    let n = t[e(420)](null)[e(424)]((a) => a instanceof pn), r = function(a) {
      const h = Do, l = Math[h(120)](a[h(106)][h(119)].width, a.root[h(119)][h(122)]), c = l / 2, u = l, d = l, f = c, x = a[h(106)];
      return function m(I) {
        const y = h;
        if (!I.subtreeWidth)
          if (I.children[y(107)] === 0)
            I.subtreeWidth = l;
          else {
            let S = 0;
            I.children.forEach((v) => {
              S += m(v);
            }), S += f * (I[y(113)][y(107)] - 1), I[y(108)] = Math[y(120)](S, l);
          }
        return I.subtreeWidth;
      }(x), function m(I, y) {
        const S = h;
        if (I.children[S(107)] === 0)
          return I.translate(y + c, I.y), y + l;
        let v = y, L = 0;
        return I[S(113)][S(104)]((w, T) => {
          const R = S;
          v = m(w, v), L += w.x, T < I.children[R(107)] - 1 && (v += f);
        }), L /= I.children.length, I.translate(L, I.y), v;
      }(x, 0), function m(I, y = 0) {
        const S = h;
        I.level = y, I.y = y * (d + u), I.children[S(104)]((v) => {
          m(v, y + 1);
        });
      }(x), a[h(117)];
    }(this.graphSystem[e(417)](t)), i = n.map((a) => a.object), o = new Ts(i, r);
    return o.animationSystem = this.animationSystem, o;
  }
  travelTree(t, e) {
    const n = En;
    if (!t.isTree())
      throw new Error("graph is not a tree");
    return e == null && (e = t.vertexes[0]), t[n(430)](e);
  }
  sizeFitToChildren(t, e) {
    return le.sizeFitToChildren(t, e);
  }
}
const De = ir;
function ir(s, t) {
  const e = zo();
  return (ir = function(n, r) {
    return e[n -= 449];
  })(s, t);
}
(function() {
  const s = ir, t = zo();
  for (; ; )
    try {
      if (parseInt(s(469)) / 1 * (-parseInt(s(467)) / 2) + -parseInt(s(471)) / 3 * (-parseInt(s(474)) / 4) + -parseInt(s(477)) / 5 + parseInt(s(466)) / 6 + -parseInt(s(472)) / 7 + parseInt(s(450)) / 8 + parseInt(s(451)) / 9 === 922840)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Mo {
  constructor(t) {
    const e = ir;
    if (this.DefaultConfig = { fillStyle: "black", strokeStyle: e(468), font: Me.DefaultFont }, this[e(465)] = { border: e(453), fillStyle: e(462) }, this.NodeSelectedStyle = { borderWidth: 0, shadowColor: e(455), shadowBlur: 5, shadowOffsetX: 3, shadowOffsetY: 3 }, this.LinkSelectedStyle = { shadowColor: "rgba(128,128,128,0.9)", shadowBlur: 5, shadowOffsetX: 3, shadowOffsetY: 3 }, this[e(473)] = { lineWidth: 1 }, this[e(463)] = { textPosition: Ht[e(470)], textBaseline: zt.middle, textAlign: Mt[e(470)], lineWidth: 0 }, this.Node = { textPosition: Ht.cb, textAlign: Mt.center, textBaseline: zt[e(457)], lineWidth: 1 }, this.ImageNode = { textPosition: Ht.cb, textAlign: Mt[e(470)], textBaseline: zt.top, lineWidth: 1 }, this.CanvasNode = { textPosition: Ht.cb, textAlign: Mt.center, textBaseline: zt[e(457)], lineWidth: 1 }, this.TextNode = { textPosition: Ht.center, textAlign: Mt.center, textBaseline: zt.middle, lineWidth: 0 }, this.EllipseNode = { textPosition: Ht.cb, textAlign: Mt.center, textBaseline: zt.top, lineWidth: 1 }, this[e(454)] = { textPosition: Ht.ct, textAlign: Mt[e(470)], textBaseline: zt[e(457)], lineWidth: 1 }, this.ShapeNode = { textPosition: Ht.cb, textAlign: Mt.center, textBaseline: zt.top, lineWidth: 1 }, this.VideoNode = { textPosition: Ht.cb, textAlign: Mt[e(470)], textBaseline: zt.top }, this.HtmlNode = { textPosition: Ht.cb, textAlign: Mt.center, textBaseline: zt.top }, this.RatioNode = { textPosition: Ht.center, textAlign: Mt.center, textBaseline: zt.middle }, this[e(449)] = { lineWidth: 1 }, this.FoldLink = { lineWidth: 1 }, this.QuadBezierLink = { lineWidth: 1 }, this.AutoFoldLink = { lineWidth: 1 }, this[e(461)] = { lineWidth: 1 }, this[e(452)] = { lineWidth: 1 }, this.ZShapeLink = { lineWidth: 1 }, t == null)
      return;
    let n = Object.keys(t);
    for (let r = 0; r < n.length; r++) {
      let i = n[r];
      Object.assign(this[i], t[i]);
    }
  }
  toJSON() {
    let t = {}, e = Object.keys(this);
    for (let n = 0; n < e.length; n++) {
      let r = e[n], i = El[r], o = this[r], a = be.diff(o, i);
      a != null && (t[r] = a);
    }
    return t;
  }
}
const El = new Mo();
function zo() {
  const s = ["1px rgba(0,0,0,0.5)", "TipNode", "rgba(128,128,128,0.8)", "DefaultDarkName", "top", "content", "copy", "getStyle", "BezierLink", "rgba(0,0,236,0.1)", "Link.Label", "rgba(0,0,0,0)", "SelectArea", "5584428FTIaTu", "6MXcdBw", "black", "219981VxUYyW", "center", "3JPsAyR", "6576115eCOpJN", "Link.Arrow", "4259936XKOGpz", "setStyle", "#e0e0e0", "8437110uMhycC", "Link", "6229792knFJoV", "12916836kEcbXq", "ArcLink"];
  return (zo = function() {
    return s;
  })();
}
class vn {
  constructor(t, e) {
    this.name = t, this.content = new Mo(e);
  }
  [De(459)](t) {
    let e = JSON.parse(JSON.stringify(this.content));
    return new vn(t, e);
  }
  [De(475)](t, e) {
    let n = this.content[t];
    if (n == null)
      throw new Error("setStyle: className not exist: " + t);
    Object.assign(n, e);
  }
  [De(460)](t) {
    return this[De(458)][t];
  }
}
let Xn = new vn(Me.DefaultLightName, { DefaultConfig: { fillStyle: "rgba(0,0,0,0)", strokeStyle: "black", font: Me.DefaultFont }, SelectArea: { border: "1px solid rgba(0,0,0,0.5)", backgroundColor: De(462) } });
const Ft = De(476);
let Fr = new vn(Me[De(456)], { DefaultConfig: { fillStyle: De(464), strokeStyle: Ft, font: Me.DefaultFont }, SelectArea: { border: "1px solid rgba(255,255,255,0.5)", backgroundColor: "rgba(255,255,255,0.2)", lineWidth: 0 }, "Link.Label": { color: Ft }, Node: { color: Ft, lineWidth: 1 }, CanvasNode: { color: Ft, lineWidth: 1 }, ImageNode: { color: Ft, lineWidth: 1 }, TextNode: { color: Ft }, TipNode: { color: Ft }, ShapeNode: { color: Ft }, EllipseNode: { color: Ft, lineWidth: 1 }, VideoNode: { color: Ft }, RatioNode: { color: Ft }, HtmlNode: { color: Ft } });
function ae(s, t) {
  const e = jo();
  return (ae = function(n, r) {
    return e[n -= 323];
  })(s, t);
}
const Tl = ae;
(function() {
  const s = ae, t = jo();
  for (; ; )
    try {
      if (parseInt(s(355)) / 1 + -parseInt(s(335)) / 2 + parseInt(s(340)) / 3 + -parseInt(s(339)) / 4 * (-parseInt(s(331)) / 5) + -parseInt(s(351)) / 6 + -parseInt(s(325)) / 7 + parseInt(s(344)) / 8 * (parseInt(s(333)) / 9) === 408015)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class wh {
  constructor(t) {
    const e = ae;
    this.themes = {}, this.defStyles = {}, this[e(327)] = t, this.addTheme(Xn), this.addTheme(Fr), this.setTheme(Xn.name);
  }
  addTheme(t) {
    const e = ae;
    this.themes[t[e(347)]] = t;
  }
  getTheme(t) {
    return this.themes[t];
  }
  customStyleToJSON(t) {
    const e = ae;
    let n = JSON.parse(JSON.stringify(this.themes));
    delete n.DefaultLight, delete n[e(332)];
    let r = {}, i = { themeName: this.currentTheme.name, themes: n, styles: r }, o = Object.keys(this.defStyles);
    for (let a = 0; a < o.length; a++) {
      let h = o[a], l = this[e(334)][h].toJSON(t);
      r[h] = l;
    }
    return i;
  }
  clear() {
    const t = ae;
    this.defStyles = {};
    for (let e in this.themes)
      e != t(336) && e != "DefaultDark" && delete this[t(324)][e];
    this.markDirty();
  }
  fromJson(t) {
    const e = ae;
    let n = t.CustomStyle;
    if (n == null)
      return;
    let r = n.themes, i = n.styles || {};
    if (r != null) {
      let h = Object[e(348)](r);
      for (let l = 0; l < h.length; l++) {
        let c = h[l], u = r[c], d = new vn(c, u.content);
        this.addTheme(d);
      }
    }
    let o = t.Resources || [];
    this.defStyles = {};
    let a = Object[e(348)](i).filter((h) => h.startsWith("."));
    for (let h = 0; h < a[e(350)]; h++) {
      let l = a[h], c = i[l];
      this.defStyles[l] = Ut[e(338)](c, o);
    }
    n[e(356)] != null && this[e(349)](n[e(356)]);
  }
  defClass(t, e) {
    if (e instanceof Ut)
      return void (this.defStyles[t] = e);
    let n = new Ut();
    Object.assign(n, e), this.defStyles[t] = n, !t.startsWith(".") && this.markDirty();
  }
  removeClass(t) {
    delete this.defStyles[t], !t.startsWith(".") && this.markDirty();
  }
  getClass(t) {
    return this.defStyles[t];
  }
  markDirty() {
    this.stage.viewLayers.forEach((t) => {
      t._markAllDirty();
    });
  }
  start() {
    this.setTheme(this.currentTheme.name);
  }
  setTheme(t) {
    const e = ae;
    let n = this[e(352)](t);
    if (n == null)
      throw new Error(e(328));
    this.currentTheme = n, this.markDirty(), ze.isMobileDevice && this.stage.viewLayers.length === 1 && (n === Fr ? this.stage.layersContainer.style.backgroundColor = e(337) : n === Xn && (this.stage.layersContainer[e(329)].backgroundColor = "rgb(36,36,36)")), this.stage.update();
  }
  computeStyle(t) {
    const e = ae;
    let n = this, r = {}, i = this[e(326)], o = t.className;
    t[e(342)] instanceof B && (t === t.parent[e(353)] ? o = "Link.Label" : (t === t.parent.beginArrow || t === t.parent.endArrow) && (o = "Link.Arrow"));
    let a = i.getStyle(o);
    a == null && (t instanceof C ? a = i[e(341)]("Node") : t instanceof B && (a = i.getStyle("Link"))), a != null && Object.assign(r, a);
    let h = n.getClass(o);
    h != null && Object.assign(r, h);
    let l = t[e(354)];
    if (l.length > 0)
      for (let u = 0; u < l.length; u++) {
        const d = l[u];
        let f = n[e(330)](d);
        f != null && Object.assign(r, f);
      }
    let c = t[e(329)][e(346)]();
    return Object[e(345)](r, c), t[e(323)].update(r), t._afterStyleComputed(), t._computedStyle;
  }
  [Tl(343)](t, e) {
    let n = this.getTheme(e);
    if (n == null)
      throw new Error("theme not exist:" + e);
    let r = n.copy(t);
    return this.addTheme(r), r;
  }
}
function jo() {
  const s = ["getChangedProps", "name", "keys", "setTheme", "length", "846984TsqFsA", "getTheme", "label", "classList", "335434AhQepW", "themeName", "_computedStyle", "themes", "4789393SuXvEp", "currentTheme", "stage", "theme not exist.", "style", "getClass", "173255BVQeuk", "DefaultDark", "63QGvnDj", "defStyles", "1273710ZnNRRp", "DefaultLight", "rgb(255,255,255)", "fromJSON", "4pOMbiv", "2407731EzEQMU", "getStyle", "parent", "defTheme", "797224SGLLcX", "assign"];
  return (jo = function() {
    return s;
  })();
}
function Bo() {
  const s = ["2540400sXOEOi", "children", "flatten", "9eIqqpO", "mode", "1736058qycEUi", "hideList", "include", "80778koaGra", "isNode", "worldToLocalXY", "stage", "643192hwYlLk", "1221096QdbThT", "object", "50473laKcRC", "5729096fGUuOh", "yInWorld", "322LJtOsN", "camera"];
  return (Bo = function() {
    return s;
  })();
}
function Xe(s, t) {
  const e = Bo();
  return (Xe = function(n, r) {
    return e[n -= 217];
  })(s, t);
}
(function() {
  const s = Xe, t = Bo();
  for (; ; )
    try {
      if (parseInt(s(222)) / 1 + parseInt(s(220)) / 2 + -parseInt(s(232)) / 3 + -parseInt(s(219)) / 4 + parseInt(s(227)) / 5 + parseInt(s(235)) / 6 * (parseInt(s(225)) / 7) + parseInt(s(223)) / 8 * (-parseInt(s(230)) / 9) === 332778)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Cl {
  constructor(t) {
    const e = Xe;
    this[e(231)] = "painted", this[e(218)] = t;
  }
  enter(t) {
    const e = Xe;
    if (this.object != null && this.quit(), !(t != null && t !== this[e(221)] && t[e(236)] && t.getRoot() instanceof ct))
      return void (this.object = null);
    let n = this.stage.getCurrentLayer();
    if (n == null)
      return;
    this.object = t, this[e(233)] = at[e(229)](n[e(228)], (i) => i !== t), t.isSelected = !1;
    let r = this.stage[e(226)];
    this.hideList.forEach(function(i, o) {
      r.exclude(i);
    });
  }
  quit() {
    const t = Xe;
    if (this.object = null, this[t(233)] != null) {
      let e = this.stage.camera;
      this[t(233)].forEach(function(n, r) {
        e[t(234)](n);
      }), this[t(233)] = null;
    }
    this[t(218)].camera.markDirty();
  }
  getObject() {
    const t = Xe;
    return this[t(221)] || this[t(218)].getCurrentLayer();
  }
  getMouseXY() {
    const t = Xe;
    return this.object == null ? { x: this[t(218)].inputSystem.xInWorld, y: this[t(218)].inputSystem.yInWorld } : this[t(221)][t(217)](this.stage.inputSystem.xInWorld, this.stage.inputSystem[t(224)]);
  }
}
function Wo() {
  const s = ["zoomBy", "copy", "1596858WLwmJe", "identity", "1650631pjCTfB", "locked", "getAABB", "offsetY", "map", "offsetWith", "camera", "_updateMatrix", "lookAtContentCenter", "_init", "3UUJYoJ", "allocate", "_excludeMap", "halfWidth", "viewportRect", "viewLayers", "_cameraDirty", "9801659SjBXzO", "toScreenXY", "pointXY", "scale", "toScreenRect", "zoomInFactor", "screenInvertTransform", "dispatchEvent", "height", "5178610pJPJuX", "_offsetY", "hasListener", "getTransform", "offsetX", "zoomOutFactor", "getShowOnlyObject", "defaultPrevented", "_locked", "stage", "markDirty", "getWorldTransform", "zoomInLimit", "screenTransform", "lookAtY", "multiply", "localView", "toAABB", "width", "zoomOutLimit", "8HKdrFy", "31396005soLASq", "1817482jjGPtl", "removeEventListener", "getScreenTransform", "canSee", "3730600qXVsTO"];
  return (Wo = function() {
    return s;
  })();
}
const M = es;
function es(s, t) {
  const e = Wo();
  return (es = function(n, r) {
    return e[n -= 306];
  })(s, t);
}
(function() {
  const s = es, t = Wo();
  for (; ; )
    try {
      if (-parseInt(s(323)) / 1 + -parseInt(s(314)) / 2 * (-parseInt(s(333)) / 3) + parseInt(s(318)) / 4 + -parseInt(s(349)) / 5 + -parseInt(s(321)) / 6 + parseInt(s(340)) / 7 * (-parseInt(s(312)) / 8) + parseInt(s(313)) / 9 === 977103)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class vh extends Ge {
  constructor(t, e) {
    super(t, e);
  }
}
class _h extends we {
  constructor(t) {
    const e = es;
    super(), this[e(335)] = /* @__PURE__ */ new WeakMap(), this._offsetX = 0, this._offsetY = 0, this._scale = 1, this._cameraDirty = !0, this.screenTransform = wt[e(334)](), this[e(346)] = wt.allocate(), this.enableWheelZoom = !0, this._locked = !1, this[e(345)] = 1.25, this[e(354)] = 0.8, this[e(361)] = 10, this[e(311)] = 0.1, this.viewportRect = new E(0, 0, 1, 1), this.lookAtX = 0, this.lookAtY = 0, this.stage = t, this._init(), this.localView = new Cl(t), this.localView.mode = null;
  }
  _init() {
    this[es(353)] = 0, this.offsetY = 0, this.scale = 1, this.lookAtX = 0, this.lookAtY = 0, this._locked = !1, this.viewportRect.setTo(0, 0, 1, 1);
  }
  lock() {
    this._locked = !0;
  }
  unlock() {
    this._locked = !1;
  }
  set [M(324)](t) {
    this[M(357)] = t;
  }
  get locked() {
    return this._locked;
  }
  exclude(t) {
    const e = M;
    this._excludeMap.set(t, !0), this[e(359)]();
  }
  include(t) {
    this._excludeMap.delete(t), this.markDirty();
  }
  [M(317)](t) {
    return !this[M(335)].has(t);
  }
  lookAt(t, e) {
    this.lookAtX = t, this.lookAtY = e;
    let n = this.toScreenXY(t, e), r = this.stage.getCenter(), i = r.x - n.x, o = r.y - n.y;
    this.offsetWith(i / this.scale, o / this.scale);
  }
  getOffsetInScreen() {
    const t = M;
    let e = this.toScreenXY(0, 0);
    return { x: e.x - this.stage[t(336)], y: e.y - this.stage.halfHeight };
  }
  zoomOut() {
    this.zoomBy(this.zoomOutFactor);
  }
  zoomIn() {
    this.zoomBy(this.zoomInFactor);
  }
  zoom(t) {
    const e = M;
    let n = t / this.scale;
    this[e(319)](n, this.lookAtX, this.lookAtY);
  }
  addEventListener(t, e) {
    super.addEventListener(t, e);
  }
  removeEventListener(t, e) {
    super[M(315)](t, e);
  }
  hasListener(t) {
    return super[M(351)](t);
  }
  [M(319)](t, e, n) {
    const r = M;
    if (this._locked)
      return;
    if (this.scale * t > this.zoomInLimit ? t = this.zoomInLimit / this[r(343)] : this[r(343)] * t < this[r(311)] && (t = this.zoomOutLimit / this[r(343)]), this[r(351)]("zoom")) {
      let l = new vh("zoom", { cancelable: !0, zoomInfo: { factor: t, x: e, y: n } });
      if (this[r(347)](l), l[r(356)] == 1)
        return;
    }
    if (this._updateMatrix(), e == null || n == null) {
      let l = this.stage.getRect().getCenter(), c = this.toWorldXY(l.x, l.y);
      e = c.x, n = c.y;
    }
    let i = this[r(341)](e, n);
    this[r(343)] *= t, this[r(330)]();
    let o = this.toScreenXY(e, n), a = (i.x - o.x) / this.scale, h = (i.y - o.y) / this[r(343)];
    this[r(328)](a, h), this[r(330)]();
  }
  toScreenXY(t, e) {
    return this.screenTransform.pointXY(t, e);
  }
  toWorldXY(t, e) {
    const n = M;
    return this.screenInvertTransform[n(342)](t, e);
  }
  toWorldRect(t) {
    return pe[M(309)](new E(), this.screenInvertTransform.points([], t.toPoints()));
  }
  [M(344)](t) {
    return pe.toAABB(new E(), this.screenTransform.points([], t.toPoints()));
  }
  _dragWith(t, e) {
    const n = M;
    this._locked || this[n(328)](t, e);
  }
  lookOnly(t) {
    const e = M;
    t == null ? this.stage[e(329)][e(308)].quit() : this[e(358)].camera.localView.enter(t), this.markDirty();
  }
  [M(355)]() {
    return this[M(308)].object;
  }
  zoomToFit(t = {}) {
    const e = M, n = this[e(358)];
    let r = n[e(338)][e(327)]((c) => c[e(325)]()), i = E.unionRects(r), o = t.padding || 0, a = (n[e(310)] - 2 * o) / i.width, h = (n.height - 2 * o) / i[e(348)], l = Math.min(a, h);
    this.lookAt(i.center, i.middle), this.zoom(l);
  }
  [M(331)](t) {
    const e = this[M(358)];
    t == null && (t = e.getCurrentLayer()), t && e.camera.lookAtObject(t.children);
  }
  lookAtObject(t) {
    const e = M;
    let n;
    if (t instanceof at)
      n = t[e(325)]();
    else {
      if (t.length == 0)
        return void this.lookAt(0, 0);
      let r = t.map((i) => i.getAABB());
      n = E.unionRects(r);
    }
    this.lookAt(n.x + 0.5 * n[e(310)], n.y + 0.5 * n[e(348)]);
  }
  _updateMatrix() {
    const t = M;
    let e = this.screenTransform;
    e[t(322)]();
    let n = this.offsetX + 0.5 * this.stage.width, r = this[t(326)] + 0.5 * this[t(358)].height;
    e.scale(this.scale, this[t(343)]), e.translate(n, r), this[t(346)] = e.invert();
    let i = this[t(358)].getRect().getCenter(), o = this.toWorldXY(i.x, i.y);
    this.lookAtX = o.x, this[t(306)] = o.y;
    let a = this.stage.getRect().toPoints(), h = pe.toAABB(new E(), this.screenInvertTransform.points([], a));
    this[t(337)] = h;
  }
  reset() {
    const t = M;
    this[t(332)](), this[t(308)].quit();
  }
  [M(328)](t, e) {
    this._offsetX += t, this._offsetY += e, this._cameraDirty = !0;
  }
  setOffset(t, e) {
    this._offsetX = t, this._offsetY = e, this._cameraDirty = !0;
  }
  isDirty() {
    return this._cameraDirty;
  }
  markDirty() {
    this._cameraDirty = !0;
  }
  clearDirty() {
    this._cameraDirty = !1;
  }
  [M(352)]() {
    return this.screenTransform;
  }
  [M(316)]() {
    return this[M(362)];
  }
  getObjectScreenTransform(t) {
    const e = M;
    let n = t[e(360)](), r = n[e(320)]();
    return wt[e(307)](r, this[e(362)], n), r;
  }
  get offsetX() {
    return this._offsetX;
  }
  set [M(353)](t) {
    this._offsetX !== t && (this._cameraDirty = !0), this._offsetX = t;
  }
  get [M(326)]() {
    return this[M(350)];
  }
  set [M(326)](t) {
    this._offsetY !== t && (this._cameraDirty = !0), this._offsetY = t;
  }
  get scale() {
    return this._scale;
  }
  set scale(t) {
    const e = M;
    this._scale !== t && (this[e(339)] = !0), this._scale = t;
  }
}
const mt = In;
function Ro() {
  const s = ["1372578FuFtvs", "red", "stage", "moveWith", "getTransform", "cacheCanvas", "341457oXhGrj", "map", "9UyRMGm", "getRect", "styleSystem", "filter", "camera", "133805PLpZqG", "rectObj", "setStyles", "hide", "pointerout", "save", "show", "getHeight", "height", "preventDefault", "pointerdown", "_computedStyle", "1784265lBjyzc", "stroke", "render", "1771OcRivB", "restore", "resize", "offsetX", "pointerY", "getStyle", "dirty", "initEvent", "getWidth", "Handler", "rgba(255,255,255,0.5)", "52fFkibo", "offsetY", "scale", "isDraging", "translateWith", "isPointerDown", "strokeStyle", "domElement", "style", "paint", "translate", "80620ZGzZvd", "pointermove", "exportSystem", "fill", "setSize", "appendChild", "transform", "360021HaXpzt", "2TqmlhG", "width", "canvas", "solid 1px gray", "max", "previousX", "_getStageExportAABB", "3308216DGdAGu", "handlerLayer", "update"];
  return (Ro = function() {
    return s;
  })();
}
function In(s, t) {
  const e = Ro();
  return (In = function(n, r) {
    return e[n -= 157];
  })(s, t);
}
(function() {
  const s = In, t = Ro();
  for (; ; )
    try {
      if (-parseInt(s(173)) / 1 + parseInt(s(174)) / 2 * (-parseInt(s(190)) / 3) + -parseInt(s(223)) / 4 * (-parseInt(s(197)) / 5) + -parseInt(s(184)) / 6 + -parseInt(s(209)) / 7 + parseInt(s(181)) / 8 * (-parseInt(s(192)) / 9) + -parseInt(s(166)) / 10 * (-parseInt(s(212)) / 11) === 274850)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Sh extends Ih {
  constructor(t) {
    super();
  }
  paintSelected(t) {
  }
  overviewPaint(t) {
    const e = In, n = t.stage;
    let r = this.context;
    r[e(202)]();
    const i = n[e(194)].currentTheme[e(217)]("DefaultConfig");
    this.context.fillStyle = i.fillStyle, this.context[e(161)] = i.strokeStyle;
    let o = n[e(196)][e(188)]().m;
    r[e(172)](o[0], o[1], o[2], o[3], o[4], o[5]), t[e(208)].applyTo(r);
    let a = n.camera;
    const h = t._flattenList[e(195)]((l) => l._state._needPaint && a.canSee(l));
    this._paintFlattenObjects(h, n.styleSystem), r.restore();
  }
  exportPaintObjects(t, e) {
    if (t[0] instanceof ct)
      t.forEach((n) => {
        n instanceof ct && this.overviewPaint(n);
      });
    else {
      let n = [];
      t.forEach((r) => {
        n.push(r), n = n.concat(at.flatten(r.children, null));
      }), this._paintFlattenObjects(n, e);
    }
  }
}
class Dl {
  constructor(t) {
    const e = In;
    this.visible = !1, this.dirty = !0, this.paintInterval = 500, this.isPointerDown = !1, this[e(158)] = !1, this[e(179)] = 0, this.previousY = 0, this.pointerX = 0, this[e(216)] = 0, this.dx = 0, this.dy = 0, this[e(186)] = t, this.render = new Sh(t);
    let n = this.render[e(176)];
    n.style.backgroundColor = e(222), n.style.border = e(177), n.style.position = "absolute", n[e(163)].zIndex = "" + (t[e(182)].zIndex + 1), n.style.opacity = "0.7", n.style.right = "0", n.style.left = null, n[e(163)].bottom = "0", t.layersContainer[e(171)](n), this[e(176)] = n, this[e(162)] = n, this.render[e(170)](200, 123.6), this.cacheCanvas = document.createElement("canvas"), this.rectObj = new C(null, 0, 0), this.rectObj.hide(), this[e(219)](), this[e(200)]();
  }
  [mt(199)](t) {
    if (t == null)
      return this;
    for (let e in t)
      this.canvas.style[e] = t[e];
    return this;
  }
  initEvent() {
    const t = mt;
    let e = this, n = [t(207), "pointerup", "pointermove", "mousewheel", t(201)], r = e.render.canvas;
    n[t(191)](function(i) {
      ze.addEventListener(r, i, function(o) {
        const a = In;
        if (e.isDraging = !1, e.stage.getCurrentLayer() == null)
          return;
        if (o[a(215)] < 0 || o.offsetY < 0 || i == "pointerout")
          return void (e[a(160)] = !1);
        e[a(160)] && i == a(167) && (e.isDraging = !0), e.previousX = e.pointerX, e.previousY = e[a(216)], e.pointerX = o.offsetX, e[a(216)] = o.offsetY, e.dx = e.pointerX - e.previousX, e.dy = e.pointerY - e.previousY;
        let h = i + a(221);
        if (e[h] == null)
          throw new Error("Overview has no handler:" + i);
        e[h](o);
      });
    });
  }
  show() {
    const t = mt;
    this.visible = !0, this.render[t(203)](), clearInterval(this._overviewTimer);
    let e = this;
    return this._overviewTimer = setInterval(function() {
      e[t(218)] && e.update();
    }, this.paintInterval), this;
  }
  [mt(200)]() {
    const t = mt;
    return this.visible = !1, this.render[t(200)](), clearInterval(this._overviewTimer), this;
  }
  getWidth() {
    const t = mt;
    return this[t(211)][t(220)]();
  }
  getHeight() {
    return this.render.getHeight();
  }
  [mt(170)](t, e) {
    return this.render.setSize(t, e);
  }
  [mt(164)]() {
    const t = mt;
    this[t(218)] = !1;
    let e = this.stage, n = this.render, r = this.render.context;
    if (this[t(211)].clearAll(), e.getCurrentLayer() == null)
      return;
    let i = this[t(186)][t(168)]._getStageExportAABB();
    if (this.isDraging)
      r.drawImage(this.cacheCanvas, 0, 0);
    else {
      let o = this.getWidth(), a = this.getHeight(), h = o / Math.max(o, i[t(175)]), l = a / Math.max(a, i.height);
      r.save(), r.scale(h, l), r.translate(-i.x, -i.y), e.getAllVisibleLayers().forEach(function(u) {
        n.overviewPaint(u);
      }), r.restore();
      let c = this.cacheCanvas.getContext("2d");
      this[t(189)].width = this.canvas.width, this.cacheCanvas[t(205)] = this.canvas.height, c.drawImage(this.canvas, 0, 0);
    }
    this.paintDragRect(r, i);
  }
  paintDragRect(t, e) {
    const n = mt;
    let r = this.rectObj, i = this.stage, o = this.render, a = Math.max(e.width, i.width), h = Math[n(178)](e.height, i.height), l = i.width / a, c = i.height / h;
    if (l == 1 && c == 1)
      return void r.hide();
    r.show();
    let u = o[n(220)]() * l, d = o.getHeight() * c;
    r[n(214)](u, d);
    let f = o[n(220)]() / a, x = o[n(204)]() / h, m = -e.x * f, I = -e.y * x;
    m < 0 && (m = 0), I < 0 && (I = 0), m + r[n(175)] > o.getWidth() && (m = o[n(220)]() - r[n(175)]), I + r[n(205)] > o.getHeight() && (I = o.getHeight() - r.height), r[n(165)](m, I), t.save(), t.lineWidth = 2, t.fillStyle = "rgba(0,250,50,0.2)", t.strokeStyle = n(185), t.beginPath(), t.rect(r.x, r.y, r[n(175)], r.height), t[n(210)](), t[n(169)](), t[n(213)]();
  }
  [mt(183)]() {
    this.visible && this.paint();
  }
  pointerdownHandler(t) {
    const e = mt;
    this[e(160)] = !0;
    let n = this[e(198)][e(193)](), r = t.offsetX, i = t[e(224)];
    n.contains(r, i);
    let o = r - (this[e(198)].x + this.rectObj.width / 2), a = i - (this.rectObj.y + this[e(198)][e(205)] / 2);
    this[e(187)](o, a);
  }
  mousedragHandler() {
    const t = mt;
    let e = this.dx, n = this.dy;
    this[t(187)](e, n);
  }
  moveWith(t, e) {
    const n = mt;
    if (!this.rectObj.visible)
      return;
    t < 0 && this[n(198)].x + t <= 0 && (t = -this[n(198)].x), t > 0 && this[n(198)].x + this.rectObj.width >= this.getWidth() && (t = this[n(220)]() - this.rectObj[n(175)] - this.rectObj.x), e < 0 && this.rectObj.y <= 0 && (e = -this.rectObj.y), e > 0 && this.rectObj.y + this[n(198)][n(205)] >= this.getHeight() && (e = this.getHeight() - this[n(198)].height - this.rectObj.y), this.rectObj[n(159)](t, e);
    let r = this.stage[n(168)][n(180)](), i = r.width, o = r.height, a = i * (t / this.getWidth()), h = o * (e / this[n(204)]());
    this[n(186)].camera._dragWith(-a / this.stage[n(196)][n(157)], -h / this.stage.camera[n(157)]);
    let l = this;
    this._updateTimer = setTimeout(function() {
      l.update();
    }, 20);
  }
  mousewheelHandler(t) {
    t[mt(206)]();
  }
  pointermoveHandler() {
    this.isPointerDown && this.mousedragHandler();
  }
  pointerupHandler() {
    this.isPointerDown = !1;
  }
}
const re = or;
function Fo() {
  const s = ["toDataURL", "save", "revokeObjectURL", "_exportPaint", "toScreenRect", "' alt='from canvas'/>", "1022936gSHWMu", "saveAsLocalImage", "max", "1531634mAYMeS", "height", "5566638FwWgld", "open", "setSize", "6GqQeeB", "initMouseEvent", "_obb", "strokeStyle", "getAllVisibleLayers", "createEvent", "getStyle", "map", "href", "489235UPljpC", "styleSystem", "click", "isArray", "camera", "1178964jVCksm", "6585384jeDQpz", "2179398xtZxcD", "toImage"];
  return (Fo = function() {
    return s;
  })();
}
function or(s, t) {
  const e = Fo();
  return (or = function(n, r) {
    return e[n -= 273];
  })(s, t);
}
(function() {
  const s = or, t = Fo();
  for (; ; )
    try {
      if (parseInt(s(289)) / 1 + parseInt(s(302)) / 2 + parseInt(s(291)) / 3 + -parseInt(s(299)) / 4 + parseInt(s(284)) / 5 * (parseInt(s(275)) / 6) + -parseInt(s(304)) / 7 + -parseInt(s(290)) / 8 === 894953)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Al {
  constructor(t) {
    this.stage = t, this.render = new Sh(t);
  }
  [re(293)](t) {
    const e = re;
    let n = Array[e(287)](t) ? t : [t];
    return n.length > 0 && this[e(296)](n), this.render.toDataURL();
  }
  [re(292)](t) {
    let e = this.toDataURL(t), n = new Image();
    return n.src = e, n;
  }
  [re(300)](t, e) {
    let n = this[re(293)](t);
    e == null && (e = "jtopo_" + (/* @__PURE__ */ new Date()).getTime() + ".png"), this.saveDataAsFile(n, e);
  }
  saveImageInfo(t) {
    const e = re;
    let n = this[e(293)](t);
    window[e(273)]("about:blank").document.write("<img src='" + n + e(298));
  }
  download(t, e) {
    (function(n) {
      const r = or, i = document.createElement("a"), o = URL.createObjectURL(n);
      i.href = o, i.download = n.name, document.body.appendChild(i), i[r(286)](), document.body.removeChild(i), URL[r(295)](o);
    })(new File([e], t, { type: "text/json" }));
  }
  [re(296)](t) {
    const e = re;
    let n = this.render, r = t[e(282)]((c) => {
      const u = e;
      if (c instanceof ct) {
        let d = c._getExportAABB();
        return c.stage.camera.toScreenRect(d);
      }
      return c[u(277)].aabb;
    }), i = E.unionRects(r), o = Math.max(1, i.width), a = Math[e(301)](1, i[e(303)]);
    n[e(274)](o, a);
    const h = n.context;
    h[e(294)](), h.translate(-i.x, -i.y);
    const l = this.stage[e(285)].currentTheme[e(281)]("DefaultConfig");
    h.fillStyle = l.fillStyle, h.strokeStyle = l[e(278)], n.exportPaintObjects(t, this.stage.styleSystem), h.restore();
  }
  saveDataAsFile(t, e) {
    const n = re;
    let r = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
    r[n(283)] = t, r.download = e;
    let i = document[n(280)]("MouseEvents");
    i[n(276)]("click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), r.dispatchEvent(i);
  }
  _getStageExportAABB() {
    const t = re;
    let e = this.stage, n = e[t(279)]().map((r) => e[t(288)][t(297)](r._getExportAABB()));
    return E.unionRects(n);
  }
}
const Te = Ho;
(function() {
  const s = Ho, t = Xo();
  for (; ; )
    try {
      if (parseInt(s(402)) / 1 + parseInt(s(391)) / 2 + -parseInt(s(392)) / 3 * (parseInt(s(411)) / 4) + -parseInt(s(393)) / 5 + parseInt(s(388)) / 6 + parseInt(s(398)) / 7 + -parseInt(s(403)) / 8 * (parseInt(s(397)) / 9) === 323671)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Nl = Object.defineProperty, Ml = Object.getOwnPropertyDescriptor;
function Ho(s, t) {
  const e = Xo();
  return (Ho = function(n, r) {
    return e[n -= 387];
  })(s, t);
}
function Xo() {
  const s = ["clear", "24wdMmTY", "abs", "3725334CApDMh", "min", "SelectArea", "731846TUUEBo", "46728zSEyhT", "1079225iOkGdd", "name", "styleSystem", "restore", "36IfNkSy", "3868410SWvpQX", "inputSystem", "update", "renderLayer", "316030qKaIkf", "2445000LrvQOn", "devicePixelRatio", "areaBox", "HandlerLayer", "cuttingHide", "height", "context"];
  return (Xo = function() {
    return s;
  })();
}
const zl = be.gc, Ha = pt.w;
class jl extends xh {
  constructor() {
    super();
  }
  [Te(401)](t) {
    const e = Te, n = t.stage;
    this[e(410)]();
    let r = this.context;
    if (window[e(404)] && window[e(404)] != 1) {
      const i = window.devicePixelRatio;
      this[e(409)].scale(i, i);
    }
    return r.save(), t.draw(r), t.displayList.forEach((i) => i.painted = !0), this._paintFlattenObjects(t.displayList, n[e(395)]), r[e(396)](), t;
  }
}
class ar extends ct {
  constructor(t) {
    const e = Te;
    super(), this._zIndex = Rs.HandlerLayerCanvas, this[e(407)] = !1, this._axis = new yh(), this.stage = t, this.areaBox = new C(), this[e(405)][e(394)] = e(405), this.areaBox.pointerEnabled = !1, this._axis.visible = !1, this._setRender(new jl()), this.areaBox.setStyles(Xn.getStyle(e(390)));
  }
  _pickUp(t, e) {
    const n = Te;
    return t == null && (t = this.stage.inputSystem.x), e == null && (e = this.stage[n(399)].y), super._pickUp(t, e);
  }
  showAreaBox() {
    const t = Te, e = this.stage.inputSystem, n = this.areaBox;
    n.parent == null && this.addChild(n);
    let r = this.stage.styleSystem.currentTheme;
    n.setStyles(r.getStyle(t(390)));
    let i = e.pointerDownX, o = e.pointerDownY, a = e.x, h = e.y, l = Math[t(387)](i - a), c = Math.abs(o - h), u = Math.min(i, a), d = Math[t(389)](o, h);
    return n.resize(l, c), n.translate(u, d), n.translateWith(0.5 * l, 0.5 * c), new E(u, d, n.width, n[t(408)]);
  }
  pointeroutHandler(t) {
    this.pointerupHandler();
  }
  pointerupHandler() {
    this[Te(405)].removeFromParent();
  }
  [Te(400)]() {
    return this.children.length != 0 && (this._requestReapint = !0, !0);
  }
  draw(t) {
    if (Ha == null)
      return;
    t.save(), t.globalAlpha = 0.6, t.font = "bold 16px arial";
    let e = zl(Ha);
    t.fillStyle = "white", t.fillText(e, 16, this.render.getHeight() - 16), t.restore();
  }
}
function Je(s, t) {
  const e = Jo();
  return (Je = function(n, r) {
    return e[n -= 141];
  })(s, t);
}
function Jo() {
  const s = ["renderLayer", "_requestReapint", "_obb", "_calcBackgroundPosition", "style", "准备数据", "visible", "dirty", "132116AglxNc", "782454LfUeaE", "beforeRender", "_flattenList", "_isOutOfViewport", "push", "length", "localView", "afterRender", "timeline", "displayList", "_frames", "398615MxYKOD", "now", "camera", "2630292pUODrx", "940870ypokel", "timeEnd", "styleSystem", "renderLayerBefore", "currentTime", "stage", "cuttingHide", "parent", "423876goeuEF", "4714395gIUfuf"];
  return (Jo = function() {
    return s;
  })();
}
((s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Ml(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  n && i && Nl(t, e, i);
})([p(Te(406))], ar.prototype, "className", 2), function() {
  const s = Je, t = Jo();
  for (; ; )
    try {
      if (parseInt(s(143)) / 1 + -parseInt(s(159)) / 2 + -parseInt(s(144)) / 3 + -parseInt(s(167)) / 4 + -parseInt(s(155)) / 5 + parseInt(s(158)) / 6 + parseInt(s(168)) / 7 === 327038)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
}();
class Bl {
  constructor(t) {
    const e = Je;
    this[e(152)] = { currentTime: Date[e(156)]() }, this.stage = t;
  }
  start() {
    const t = Je, e = this.stage, n = this, r = e.handlerLayer, i = this[t(152)], o = e.animationSystem;
    {
      let h = e.animationSystem[t(152)].begin;
      this.timeline[t(163)] >= h && (e[t(157)][t(150)].mode = "painted");
    }
    const a = e[t(157)].localView.mode == "painted";
    (function h() {
      const l = t;
      if (e.destroyed)
        return;
      let c = Date[l(156)]();
      i.currentTime = c, !a && o.tick(c);
      let u = e.camera;
      u._cameraDirty && (u._updateMatrix(), e.update()), n._tickLayer(r, c);
      const d = e.getAllVisibleLayers();
      for (let f = 0; f < d[l(149)]; f++) {
        let x = d[f];
        e._showAxis && (x._axis[l(141)] = f == 0), u._cameraDirty && x[l(172)](), n._tickLayer(x, c);
      }
      u.clearDirty(), n.requestTimer = requestAnimationFrame(h);
    })();
  }
  renderLayerBefore(t, e) {
    const n = Je, r = this.stage[n(161)];
    for (let h = 0; h < t[n(153)].length; h++) {
      let l = t[n(153)][h];
      l.beforeRender && l.beforeRender();
    }
    if (!(e || t instanceof ar))
      return void t[n(173)].dirty;
    const i = this.stage.camera;
    let o = t[n(146)];
    t.displayList.length = 0;
    let a = !1;
    for (let h = 0; h < o[n(149)]; h++) {
      let l = o[h];
      l.style[n(142)] && (r.computeStyle(l), l[n(173)][n(142)] = !1), !l._matrixDirty || !l.isNode || l.parent instanceof B ? !a && l.isLink && (l.inLinks.length > 0 || l.outLinks.length > 0) && (a = !0) : (l.updateMatrix(), l._clearMatrixDirtyMark());
    }
    if (a)
      for (let h = 0; h < o.length; h++) {
        let l = o[h];
        l.isLink && (l.inLinks.length > 0 || l.outLinks.length > 0) && l.updateMatrix();
      }
    for (let h = 0; h < o.length; h++) {
      let l = o[h];
      l._matrixDirty && (l.updateMatrix(), l._clearMatrixDirtyMark()), l.painted = !1;
      let c = l._state;
      c[n(147)] = this.viewPortCut(l, t), c._needPaint = l.visible && l[n(166)]._state._needPaint, c._needPaint && !c._isOutOfViewport && i.canSee(l) && t.displayList[n(148)](l);
    }
    t._displayListDirty = !1;
  }
  viewPortCut(t, e) {
    const n = Je;
    if (e[n(165)] == 0)
      return !1;
    let r = e[n(164)][n(157)].viewportRect, i = t[n(171)];
    return i.aabb != null && !r.isIntersectRect(i.aabb);
  }
  _tickLayer(t, e) {
    const n = Je;
    let r = t.render;
    t._prepareRenderData();
    const i = t._needUpdateDisplayList;
    if (t[n(154)] != 0) {
      t[n(145)] && t.beforeRender(), this[n(162)](t, i), t._matrixDirty = !1, r[n(169)](t);
      for (let o = 0; o < t.displayList.length; o++) {
        let a = t[n(153)][o];
        a.afterRender && a.afterRender();
      }
      t.afterRender && t.afterRender(), t._renderTimes++;
    } else if (t[n(170)] == 1 || i) {
      t._requestReapint = !1, t.beforeRender && t.beforeRender(), this[n(162)](t, i), r.renderLayer(t), t._matrixDirty = !1;
      for (let o = 0; o < t.displayList.length; o++) {
        let a = t.displayList[o];
        a[n(151)] && a[n(151)]();
      }
      t.afterRender && t[n(151)](), t._renderTimes++;
    }
  }
  pause() {
    cancelAnimationFrame(this.requestTimer);
  }
}
const Ot = hr;
function hr(s, t) {
  const e = Yo();
  return (hr = function(n, r) {
    return e[n -= 468];
  })(s, t);
}
function Yo() {
  const s = ["922053AjEbOg", "hasListener", "2154696eeanYN", "objects", "dragHandler", "999416lefSdF", "push", "removeAll", "dragEndHandler", "addEventListener", "1879416uCqKdA", "dispatchEvent", "dragend", "26816211SaTdeS", "4149481HgwING", "parent", "2yASeCh", "includes", "reset", "10QdVwpj", "length", "979448rkQYmT", "event", "selectedHandler"];
  return (Yo = function() {
    return s;
  })();
}
(function() {
  const s = hr, t = Yo();
  for (; ; )
    try {
      if (-parseInt(s(474)) / 1 + -parseInt(s(485)) / 2 * (-parseInt(s(469)) / 3) + -parseInt(s(490)) / 4 + -parseInt(s(488)) / 5 * (parseInt(s(479)) / 6) + -parseInt(s(483)) / 7 + -parseInt(s(471)) / 8 + parseInt(s(482)) / 9 === 554060)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
let Xa = new DragEvent("dragstart"), Wl = new DragEvent(Ot(481));
class kh extends we {
  constructor() {
    const t = Ot;
    super(), this[t(472)] = [], this.isDraging = !1;
  }
  addEventListener(t, e) {
    return super[Ot(478)](t, e);
  }
  [Ot(470)](t) {
    return super.hasListener(t);
  }
  isEmpty() {
    return this.objects.length == 0;
  }
  pointeroutHandler(t) {
    this.isDraging = !1, this.isEmpty() || t.isPointerDown && this.dispatchEvent(Xa);
  }
  [Ot(473)](t) {
    const e = Ot;
    if (this[e(480)](Wl), t.event instanceof MouseEvent && t[e(491)].defaultPrevented == 1)
      return;
    let n = this.getTopObjects();
    for (let r = 0; r < n[e(489)]; r++) {
      let i = n[r];
      i.draggable && i[e(473)](t);
    }
  }
  [Ot(477)](t) {
    this[Ot(480)](Xa);
    let e = this.getTopObjects();
    for (let n = 0; n < e.length; n++) {
      let r = e[n];
      r.draggable && r.dragEndHandler(t);
    }
  }
  getTopObjects() {
    let t = this.objects, e = at.flatten(t);
    return e = at.flatten(t, (n) => {
      const r = hr;
      return !e.includes(n[r(484)]);
    }), e;
  }
  addAll(t) {
    const e = Ot;
    for (let n = 0; n < t[e(489)]; n++) {
      let r = t[n];
      this.objects[e(486)](r) || (r.selectedHandler && r[e(468)](), this.objects[e(475)](r));
    }
    return this;
  }
  add(t) {
    const e = Ot;
    return this.objects[e(486)](t) || (t[e(468)].call(t), this.objects[e(475)](t)), this;
  }
  remove(t) {
    return t.unselectedHandler && t.unselectedHandler(), jt.remove(this.objects, t), this;
  }
  [Ot(476)]() {
    const t = Ot;
    let e = this[t(472)];
    for (let n = 0; n < e.length; n++) {
      let r = e[n];
      r.unselectedHandler && r.unselectedHandler();
    }
    return this[t(472)].length = 0, this;
  }
  has(t) {
    return this.objects.includes(t);
  }
  [Ot(487)]() {
    const t = Ot;
    this.isDraging = !1, this[t(472)].length = 0;
  }
}
const k = Qt;
function Uo() {
  const s = ["Stage", "clientHeight", "removeChild", "addAll", "normal", "getCursor", "hasChildren", "getCenter", "showAxis", "_dragWith", "fullWindow", "catch", "4157TiVWsF", "removeAll", "32227833cskkYp", "pointerenterHandler", "190onOmWY", "src", "_resizeTimer", "_forceUpdate", "_obb", "map", "850821SjGdyV", "_showAxis", "fullScreen", "render", "filter", "400131OBFZJA", "fromJSON", "preMouseoverTarget", "getAABB", "getAllVisibleLayers", "start", "clickHandler", "246sWNvgN", "_resizeObserver", "drag", "deltaY", "getElementById", "offsetHeight", "13032272TrFEMH", "whenAllLoaded", "5844XiMNfS", "zIndex", "classList", "animationSystem", "handlerLayer", "layer_container", "width", "mode", "style", "exportSystem", "canvas", "resize", "isDragEnd", "then", "_pickUpViewLayers", "localView", "dragoverHandler", "4SoVbLP", "length", "3035850ykHAWH", "defaultPrevented", "isRightButton", "_getAncestors", "layoutSystem", "removeLayer", "setCursor", "pointerEnabled", "domElement", "_dragHandler", "pickObject", "pointerdownHandler", "update", "offsetWidth", "preventDefault", "Stage has been destroyed already.", "fullwindow", "camera", "addEventListener", "Resources", "resourceSystem", "mouseoverTarget", "updateZIndex", "getRect", "rect", "draggable", "grab", "isDraging", "edit", "findDropToObjec", "viewLayers", "previous", "debugPanel", "inputSystem", "saveAsLocalImage", "reset", "fullscreen", "target", "destroyed", "graphSystem", "removeAt", "remove", "dropTarget", "679XpLnfK", "forEach", "selectedGroup", "show", "overview", "layersContainer", "removeEventListener", "pointeroutHandler", "createElement", "getCurrentLayer", "appendChild", "indexOf", "visible", "dispatchEvent", "editor", "config", "hasListener", "setAttribute", "toDataURL"];
  return (Uo = function() {
    return s;
  })();
}
function Qt(s, t) {
  const e = Uo();
  return (Qt = function(n, r) {
    return e[n -= 411];
  })(s, t);
}
(function() {
  const s = Qt, t = Uo();
  for (; ; )
    try {
      if (-parseInt(s(486)) / 1 * (parseInt(s(508)) / 2) + parseInt(s(496)) / 3 * (parseInt(s(533)) / 4) + parseInt(s(412)) / 5 + -parseInt(s(516)) / 6 * (-parseInt(s(455)) / 7) + -parseInt(s(514)) / 8 + -parseInt(s(501)) / 9 * (parseInt(s(490)) / 10) + parseInt(s(488)) / 11 === 929992)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
class Jn extends Ge {
  constructor(t, e) {
    super(t, e);
  }
}
class lr extends we {
  constructor(t, e) {
    const n = Qt;
    super(), this.version = Ws, this.viewLayers = [], this.enableContextmenu = !1, this.mode = n(478), this[n(450)] = !1, this[n(497)] = !1, this[n(436)] = new E(0, 0, 1, 1), this[n(470)] = { dropAllowed: !0 }, e != null && Object.assign(this[n(470)], e), this.camera = new _h(this), this.handlerLayer = new ar(this), this.inputSystem = new fh(this), this.keyboard = new gh(this), this.selectedGroup = new kh(), this.resourceSystem = pt, this._init(t), this.styleSystem = new wh(this), this.animationSystem = new el(), this.effectSystem = new fl(this, this.animationSystem), this.graphSystem = new mn(), this[n(416)] = new bh(this[n(519)], this[n(451)]), this.renderSystem = new Bl(this), this.exportSystem = new Al(this), this.serializerSystem = new Ms(this);
    const r = this;
    this[n(432)].addEventListener("loaded", (i) => {
      r.update();
    }), this.camera._updateMatrix(), this.styleSystem[n(506)](), this.renderSystem.start();
  }
  [k(435)]() {
    const t = k;
    return this[t(436)][t(522)] = this[t(522)], this.rect.height = this.height, this.rect;
  }
  _init(t) {
    const e = k;
    let n = this;
    document.addEventListener("contextmenu", function(o) {
      const a = Qt;
      n.inputSystem.isPointerOn && o[a(426)]();
    }), n[e(420)] = function(o) {
      const a = k;
      if (typeof o == "string" && (o = document[a(512)](o)) == null)
        throw new Error("element is not found id:" + o);
      if (o == null)
        throw new Error("the dom element is null.");
      return Object.assign(o[a(524)], { display: "flex", position: "relative", flexDirection: "column" }), o;
    }(t);
    const r = document.createElement("div");
    r[e(518)].add(e(521)), r.setAttribute(e(524), "position:relative;flex:1;width:100%;-webkit-user-select:none;"), n[e(460)] = r, n[e(420)].appendChild(r), n[e(522)] = r[e(425)], n.height = r.clientHeight;
    const i = document[e(463)]("div");
    i[e(518)].add("ui_container"), i[e(472)]("style", "position:absolute;width:100%;-webkit-user-select:none;"), n.uiContainer = i, n[e(420)].appendChild(i);
    {
      const o = this[e(520)].render.canvas;
      o[e(524)][e(517)] = "" + this[e(520)].zIndex, this.layersContainer[e(465)](o);
    }
    this.autoAdjustChildrenSize(), n.debugPanel = new gl(n);
  }
  autoAdjustChildrenSize() {
    const t = k;
    let e = this;
    const n = e[t(460)];
    if (window.ResizeObserver) {
      const i = new ResizeObserver((o) => {
        be.delayRun(n, function() {
          const a = Qt;
          Ja(e, n.clientWidth, n[a(475)]);
        }, 30);
      });
      return i.observe(n), void (e._resizeObserver = i);
    }
    let r = setInterval(function() {
      const i = t;
      let o = n.offsetWidth, a = n[i(513)];
      (e.width != o || e.height != a) && Ja(e, o, a);
    }, 500);
    e._resizeTimer = r;
  }
  showDebugPanel() {
    this.debugPanel.show();
  }
  hideDebugPanel() {
    this[k(444)].hide();
  }
  showOverview(t) {
    const e = k;
    let n = this;
    n.overview == null && (n.overview = new Dl(n)), n[e(459)].setStyles(t), n.overview[e(458)]();
  }
  _updateOverview() {
    this.overview != null && this.overview.update();
  }
  hideOverview() {
    const t = k;
    this.overview != null && this[t(459)].hide();
  }
  addLayer(t) {
    const e = k;
    if (this.viewLayers.length >= Q.MaxLayerCount)
      throw new Error("out of max layer count");
    t.resize(this[e(522)], this.height), this.viewLayers.push(t);
    const n = t[e(499)].canvas;
    this.layersContainer.appendChild(n), this.updateZIndex(), t._onMound(this);
  }
  [k(434)]() {
    const t = k, e = this[t(442)];
    if (e.length === 0 || (e.sort(function(r, i) {
      const o = t;
      return r.zIndex - i[o(517)];
    }), e.length <= 1))
      return;
    const n = this.layersContainer;
    e.forEach((r) => {
      const i = t;
      r.render.canvas.style[i(517)] = "" + r[i(517)];
    }), e[t(495)]((r) => {
      const i = t;
      return r.canvas.remove(), r[i(526)];
    }).forEach((r) => {
      n[t(465)](r);
    });
  }
  removeLayer(t) {
    const e = k;
    t.render.canvas[e(453)]();
    let n = this.viewLayers.indexOf(t);
    return n == -1 || (jt[e(452)](this[e(442)], n), t.stage = null), this;
  }
  [k(476)](t) {
    return this.removeLayer(t);
  }
  [k(458)]() {
    const t = k;
    return this.camera.markDirty(), this.viewLayers.forEach(function(e) {
      e.show();
    }), this[t(432)][t(515)]();
  }
  hide() {
    this.viewLayers.forEach(function(t) {
      t.hide();
    });
  }
  update() {
    const t = k;
    this[t(469)] && this.editor[t(424)](), this.handlerLayer.update(), this.viewLayers[t(456)](function(e) {
      e.update();
    });
  }
  _forceUpdate() {
    const t = k;
    this.handlerLayer[t(493)](), this[t(442)].forEach(function(e) {
      e._forceUpdate();
    });
  }
  toDataURL() {
    const t = k;
    return this.exportSystem[t(473)](this.viewLayers);
  }
  saveImageInfo() {
    return this.exportSystem.saveImageInfo(this.viewLayers);
  }
  [k(446)]() {
    const t = k;
    this[t(525)][t(446)](this.viewLayers);
  }
  [k(430)](t, e) {
    return super.addEventListener(t, e);
  }
  [k(461)](t, e) {
    return super.removeEventListener(t, e);
  }
  [k(471)](t) {
    return super.hasListener(t);
  }
  fullWindow() {
    const t = k;
    if (this[t(471)]("fullwindow")) {
      let e = new Jn(t(428), { cancelable: !0 });
      if (this[t(468)](e), e.defaultPrevented == 1)
        return;
    }
    ze[t(484)](this.domElement);
  }
  fullScreen() {
    const t = k;
    if (this.hasListener(t(448))) {
      let e = new Jn("fullscreen", { cancelable: !0 });
      this.dispatchEvent(e);
    }
    ze[t(498)](this.domElement);
  }
  setMode(t) {
    const e = k;
    if (this.hasListener("modechange")) {
      let n = new Jn("modechange", { cancelable: !0, mode: t });
      if (this.dispatchEvent(n), n[e(413)] == 1)
        return;
    }
    this[e(523)] = t, t == Jt[e(510)] ? this.setCursor(it[e(438)]) : this[e(418)](it.default);
  }
  dropHandler(t) {
  }
  [k(532)]() {
  }
  mouseoverHandler() {
  }
  [k(423)](t) {
    const e = k, n = this.inputSystem;
    if (this[e(523)] == Jt.drag)
      return void this.setCursor(it.grabbing);
    let r = this.inputSystem[e(449)];
    if (r != null)
      return void n[e(422)](r);
    !(t.ctrlKey || t.metaKey) && this[e(457)].removeAll();
  }
  static [k(441)](t, e) {
    const n = k;
    let r = ls[n(415)](t), i = at.flatten(t.children);
    for (let o = e[n(411)] - 1; o >= 0; o--) {
      let a = e[o];
      if (t !== a && a !== t.parent && a.dropAllowed && r[n(466)](a) == -1 && i.indexOf(a) == -1 && a[n(494)].aabb.containsRect(t._obb.aabb))
        return a;
    }
    return null;
  }
  _dragHandler(t) {
    const e = k, n = this.mode;
    if (n == Jt.paint)
      return;
    const r = this.inputSystem, i = this.handlerLayer, o = this[e(445)][e(449)], a = this[e(457)], h = t.buttons == 1, l = h && o != null && o.pointerEnabled && o[e(437)], c = this.viewLayers[e(500)]((u) => u.pointerEnabled);
    if (h && this.config.dropAllowed && l && o.draggable) {
      let u = null;
      for (let d = 0; d < c.length; d++) {
        const f = c[d].displayList.filter((x) => x.isNode);
        u = lr.findDropToObjec(o, f), u !== r[e(454)] && r.dropTarget && r.dropTarget.dragoutHandler(r), u != null && u[e(532)](this[e(445)]);
      }
      r.dropTarget = u;
    }
    if (l && this.mode !== Jt[e(510)])
      return void a.dragHandler(r);
    !h || n != Jt.select && n != Jt[e(440)] ? (this.setCursor(it.grabbing), this.camera[e(483)](r.dxInWorld, r.dyInWorld)) : function(u) {
      const d = k;
      let f = u.stage, x = u.showAreaBox(), m = u.stage[d(442)];
      for (let I = 0; I < m.length; I++) {
        let y = m[I];
        if (!y[d(480)]())
          continue;
        let S = f.camera.toWorldRect(x), v = y._pickUpByRect(S);
        f[d(457)][d(477)](v), v.length > 0 && y.update();
      }
    }(i);
  }
  pointerupHandler(t) {
    const e = k, n = this.inputSystem, r = this.viewLayers, i = n[e(414)];
    this[e(520)].pointerupHandler();
    for (let a = 0; a < r.length; a++) {
      const h = r[a];
      h.draggable && n.isDraging && h.dragEndHandler(n);
    }
    if (this.mode == Jt[e(510)])
      return void this.setCursor(it[e(438)]);
    this.setCursor("default");
    let o = this.inputSystem[e(449)];
    o && o[e(419)] && (o.pointerupHandler(n), n.previous.isDraging && o.draggable && i == 0 && this[e(457)].dragEndHandler(n)), this[e(470)].dropAllowed && n.dropTarget && (n.dropTarget.dropHandler(n), n.dropTarget = null);
  }
  [k(462)](t) {
    const e = k, n = this.inputSystem;
    this[e(520)].pointeroutHandler(n), this.selectedGroup.pointeroutHandler(n);
  }
  [k(507)](t) {
    const e = k, n = this.inputSystem;
    let r = n[e(449)];
    r && !n[e(443)].isDragEnd && r.clickHandler(n);
  }
  dblclickHandler(t) {
    const e = k, n = this[e(445)];
    let r = n.target;
    r && !n[e(443)][e(528)] && r.dblclickHandler(n);
  }
  pointermoveHandler(t) {
    const e = k, n = this.inputSystem;
    if (this[e(464)]() == null)
      return;
    if (n.touchWheel.touchsCount > 1)
      return void (this[e(520)].areaBox.ownerLayer && this.handlerLayer.areaBox.removeFromParent());
    if (n[e(439)])
      return this[e(421)](t);
    if (this.mode == Jt[e(510)])
      return void this.setCursor(it.grab);
    if (n.skipPointerMovePicking)
      return;
    let r = n[e(503)], i = n[e(433)];
    r !== i && r != null && r.pointeroutHandler && r.pointeroutHandler(n), i != null && (r !== i ? i.pointerenterHandler && i[e(489)](n) : (i.title != null && (this.handlerLayer.render.canvas.title = i.title), i.pointermoveHandler(n)));
  }
  wheelHandler(t) {
    const e = k;
    if (this.getCurrentLayer() == null || this.camera.enableWheelZoom == 0)
      return;
    let n = this[e(445)].xInWorld, r = this[e(445)].yInWorld;
    t[e(511)] < 0 ? this[e(429)].zoomBy(this.camera.zoomInFactor, n, r) : this.camera.zoomBy(this[e(429)].zoomOutFactor, n, r);
  }
  pointerenterHandler(t) {
  }
  [k(530)]() {
    const t = k;
    let e = this[t(442)], n = this.camera;
    for (let r = e.length - 1; r >= 0; r--) {
      let i = e[r];
      if (!i[t(467)] || !i.pointerEnabled)
        continue;
      let o = i._pickUp();
      if (o != null && o !== n.localView.object)
        return o;
    }
    return null;
  }
  getCursor() {
    const t = k;
    return this.handlerLayer.render[t(479)]();
  }
  setCursor(t) {
    return this[k(520)].render.setCursor(t);
  }
  download(t, e) {
    return this.exportSystem.download(t, e);
  }
  select(t) {
    const e = k;
    this.selectedGroup[e(487)](), this.selectedGroup[e(477)](t);
  }
  [k(464)]() {
    const t = k;
    let e = this.viewLayers.filter((n) => n.visible);
    return e[t(411)] == 0 ? null : e[e[t(411)] - 1];
  }
  getAABB() {
    const t = k;
    if (this.viewLayers.length == 0)
      return new E(0, 0, this[t(522)], this.height);
    let e = this.viewLayers[t(495)]((n) => this.camera.toScreenRect(n[t(504)]()));
    return E.unionRects(e);
  }
  [k(505)]() {
    return this.viewLayers.filter((t) => t.visible);
  }
  [k(481)]() {
    return { x: 0.5 * this.width, y: 0.5 * this.height };
  }
  setCamera(t) {
    this[k(429)] = t;
  }
  toJSON() {
    const t = k;
    return zs(this, this.viewLayers[t(500)]((e) => e.serializeable), null, t(474));
  }
  toJSONWithBase64() {
    let t = zs(this, this.viewLayers.filter((i) => i.serializeable), null, "Stage"), e = t.Resources || [], n = [], r = [];
    return e.filter((i) => i.type == "img").map((i, o) => {
      const a = Qt;
      n.push(i[a(491)]), r.push(o);
    }), new Promise((i, o) => {
      const a = Qt;
      Hn.batchLoadAndConvertImages(n).then((h) => {
        const l = Qt;
        for (let c = 0; c < h[l(411)]; c++)
          e[r[c]].src = h[c];
        i(t);
      })[a(485)](o);
    });
  }
  [k(502)](t, e) {
    const n = k;
    if (t.Roots.length > 1 && t.SerializeType != "Stage")
      throw new Error("SerializeType is not Stage");
    this.reset();
    const r = this;
    function i() {
      const a = Qt;
      let h = Ps(r, t, e);
      for (let l = 0; l < h[a(411)]; l++) {
        let c = h[l];
        r.addLayer(c);
      }
      r.styleSystem.markDirty(), r._forceUpdate(), r[a(429)].zoom(1), r[a(429)].lookAt(0, 0), r.camera.lookAtContentCenter(), r.camera[a(531)].quit(), setTimeout(() => {
        r.styleSystem.markDirty();
      }, 20);
    }
    let o = (t[n(431)] || [])[n(500)]((a) => a.type == "img")[n(495)]((a) => a[n(491)]);
    return new Promise((a, h) => {
      const l = n;
      if (o[l(411)] == 0)
        return i(), void a(!0);
      pt.whenAllImagesLoaded(o)[l(529)](() => {
        i(), a(!0);
      })[l(485)]((c) => {
        h(c);
      });
    });
  }
  [k(482)]() {
    return this._showAxis = !0, this;
  }
  hideAxis() {
    return this._showAxis = !1, this;
  }
  _reloadTest() {
    return this.toJSONWithBase64().then((t) => this[Qt(502)](t));
  }
  reset() {
    const t = k;
    this.styleSystem.clear(), this.animationSystem.cancelAll();
    let e = this.viewLayers.slice();
    for (let n of e)
      this[t(417)](n);
    this.camera.reset(), this.inputSystem.reset(), this[t(457)][t(447)]();
  }
  destroy(t) {
    const e = k;
    if (this.destroyed)
      throw new Error(e(427));
    this.destroyed = !0, this.reset(), this[e(509)] && this._resizeObserver.disconnect(), this._resizeTimer && clearInterval(this[e(492)]), this.handlerLayer.destroy(), this.viewLayers.forEach((n) => {
      n.destroy();
    }), this.domElement.innerHTML = "", t != 0 && pt.clearCache();
  }
}
function Ja(s, t, e) {
  const n = k;
  s.width = t, s.height = e, s.halfWidth = 0.5 * t, s.halfHeight = 0.5 * e, s[n(520)]._updateRenderSize(t, e), s.viewLayers.forEach(function(i) {
    i._updateRenderSize(t, e);
  }), s[n(429)].markDirty();
  let r = new Jn(n(527));
  s.dispatchEvent(r);
}
function Go() {
  var s = ["width", "40OyxyvB", "215DlyUJJ", "182322EfNLdg", "_drawContentDesc", "_width", "1040666tgamqX", "1286847LTYTBW", "7FElLNX", "shapeSize", "setRadius", "cos", "879794FuuxcN", "hasBorder", "4691672MYLsBP", "1518488sqJYJI", "6312357szKCBa"];
  return (Go = function() {
    return s;
  })();
}
var Ir = cr;
(function() {
  for (var s = cr, t = Go(); ; )
    try {
      if (-parseInt(s(265)) / 1 + -parseInt(s(271)) / 2 + parseInt(s(266)) / 3 + -parseInt(s(274)) / 4 + parseInt(s(278)) / 5 * (-parseInt(s(262)) / 6) + parseInt(s(267)) / 7 * (parseInt(s(273)) / 8) + -parseInt(s(275)) / 9 * (-parseInt(s(277)) / 10) === 654074)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Rl = Object.defineProperty, Fl = Object.getOwnPropertyDescriptor, Ya = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Fl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Rl(t, e, i), i;
};
function cr(s, t) {
  var e = Go();
  return (cr = function(n, r) {
    return e[n -= 262];
  })(s, t);
}
class Hr extends C {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    var o = cr;
    super(t, e, n, r, i), this[o(264)] = r, this._height = i;
  }
  [Ir(269)](t = 1) {
    this.width = 2 * t, this.height = 2 * t;
  }
  getLocalPoint(t, e = 0) {
    var n = Ir;
    if (this[n(263)][n(272)])
      return super.getLocalPoint(t, 0);
    let r = t * (2 * Math.PI), i = this[n(263)][n(268)];
    return { x: 0.5 * i[n(276)] * Math[n(270)](r), y: 0.5 * i.height * Math.sin(r) };
  }
  set radius(t) {
    this.width = 2 * t, this.height = 2 * t;
  }
  get radius() {
    var t = Ir;
    return 0.5 * Math.max(this[t(276)], this.height);
  }
}
Ya([p("EllipseNode")], Hr.prototype, "className", 2), Ya([p(os.getShape("Ellipse"))], Hr.prototype, "_shape", 2);
const Pt = us;
function Vo() {
  const s = ["_imgRaw", "_imageSrc", "5802fnparm", "objJson", "imageObject", "src", "loadImageWithObj", "_fromJSON", "_drawImage", "shapeSize", "77rkXdFZ", "578620wctXCL", "length", "style", "4527351CfClNe", "width", "hasBackgroundColor", "gif", "save", "image", "7xWHddt", "imageSrc", "next", "get", "240YzUdHR", "3716gMGPPy", "1835ppmmpE", "_beforeToJSON", "407124dgpomN", "_toJSON", "1795552bmYRdB", "resourcesArr", "169170TkphhH"];
  return (Vo = function() {
    return s;
  })();
}
(function() {
  const s = us, t = Vo();
  for (; ; )
    try {
      if (-parseInt(s(296)) / 1 + parseInt(s(303)) / 2 * (parseInt(s(292)) / 3) + -parseInt(s(293)) / 4 * (-parseInt(s(294)) / 5) + parseInt(s(300)) / 6 * (-parseInt(s(288)) / 7) + parseInt(s(298)) / 8 + -parseInt(s(282)) / 9 + parseInt(s(279)) / 10 * (parseInt(s(278)) / 11) === 264143)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Hl = Object.defineProperty, Xl = Object.getOwnPropertyDescriptor;
class cs extends C {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(t, e, n, r, i);
  }
  get image() {
    return this._imgRaw;
  }
  set [Pt(287)](t) {
    this[Pt(301)] = t, this.setImage(t);
  }
  get imageSrc() {
    return this[Pt(302)];
  }
  set [Pt(289)](t) {
    this.setImage(t), this._imageSrc = t;
  }
  _strokeAndFill(t) {
    const e = Pt;
    let n = this._drawContentDesc;
    t[e(286)](), (n.hasBorder || n[e(284)]) && this._drawBackgroundOrBorder(t), this[e(272)] != null && this[e(276)](t, this.imageObject), t.restore();
  }
  _drawImage(t, e) {
    const n = Pt;
    let r = this._drawContentDesc[n(277)];
    t.drawImage(e, 0.5 * -r[n(283)], 0.5 * -r.height, r.width, r.height);
  }
  setImage(t, e = !1) {
    const n = Pt;
    pt.cancelLoadByObject(this), this[n(301)] = t;
    let r = this;
    return typeof t == "string" && (t = t.trim()), new Promise((i, o) => {
      const a = n;
      (t == null || t == "") && (this[a(302)] = null, this[a(272)] = null, r.style.dirty = !0, i(null)), typeof t == "string" && pt[a(274)](this, t, function(h) {
        const l = a;
        h != null ? (r._imageSrc = h.getAttribute("src"), r.imageObject = h, r[l(302)].toLowerCase().endsWith(l(285)) && (h.isGIF = !0), e == 1 && r.resize(h.width, h.height), r[l(281)].dirty = !0, i(r.imageObject)) : i(null);
      }), t instanceof HTMLImageElement && (r._imageSrc = t.getAttribute("src"), r.imageObject = t, e == 1 && r.resize(t.width, t.height), r.style.dirty = !0, i(r[a(272)]));
    });
  }
  resizeToFitImage() {
    const t = Pt;
    return this.imageObject != null && this.resize(this[t(272)].width, this.imageObject.height), this;
  }
  getImageObject() {
    const t = this;
    return new Promise((e, n) => {
      const r = us;
      if (t.imageObject != null)
        return void e(t.imageObject);
      let i = pt.objCache[r(291)](t);
      i != null ? i[r(290)] = function(o) {
        e(o);
      } : n(null);
    });
  }
  [Pt(295)](t) {
    const e = Pt;
    super._beforeToJSON(t), this.imageObject != null && t.indexImage(this[e(272)]);
  }
  _toJSON(t) {
    const e = Pt;
    let n = super[e(297)](t);
    if (t != null) {
      let r = t.resourcesIndexMap;
      if (this.imageObject != null) {
        let i = r[e(291)](this.imageObject);
        i != null && (n.image = i);
      }
    }
    return n;
  }
  [Pt(275)](t) {
    const e = Pt;
    if (super._fromJSON(t), t[e(271)].image != null) {
      let n = t[e(299)][t.objJson.image];
      n && n.type == "img" && (this.imageSrc = n[e(273)]);
    }
  }
  destroy() {
    const t = Pt;
    super.destroy(), this[t(272)] = null, this[t(301)] = null;
  }
}
function us(s, t) {
  const e = Vo();
  return (us = function(n, r) {
    return e[n -= 271];
  })(s, t);
}
((s, t, e, n) => {
  const r = us;
  for (var i, o = n > 1 ? void 0 : n ? Xl(t, e) : t, a = s[r(280)] - 1; a >= 0; a--)
    (i = s[a]) && (o = (n ? i(t, e, o) : i(o)) || o);
  n && o && Hl(t, e, o);
})([p("ImageNode")], cs.prototype, "className", 2);
var Pe = Ce;
(function() {
  for (var s = Ce, t = qo(); ; )
    try {
      if (parseInt(s(209)) / 1 * (parseInt(s(195)) / 2) + -parseInt(s(186)) / 3 + parseInt(s(193)) / 4 + parseInt(s(181)) / 5 * (parseInt(s(203)) / 6) + parseInt(s(190)) / 7 * (-parseInt(s(182)) / 8) + parseInt(s(198)) / 9 + parseInt(s(183)) / 10 * (-parseInt(s(208)) / 11) === 531897)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Jl = Object.defineProperty, Yl = Object.getOwnPropertyDescriptor, br = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Yl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Jl(t, e, i), i;
};
function Ce(s, t) {
  var e = qo();
  return (Ce = function(n, r) {
    return e[n -= 179];
  })(s, t);
}
function qo() {
  var s = ["width", "prototype", "2238978BEIgjF", "_video", "ended", "imageObject", "autoplay", "509531roRVPH", "352960xhlGdW", "play", "_dom", "5XbHnkO", "24088CIlwVQ", "20AbYIjH", "_drawBackgroundOrBorder", "isPlaying", "2063730YgFHlv", "_videoSrc", "remove", "restore", "1883OVMJyL", "catch", "setVideo", "3935096pOoxcH", "drawImage", "2dLXMMX", "_drawContentDesc", "height", "3712599oFAEHY", "addEventListener", "destroy"];
  return (qo = function() {
    return s;
  })();
}
class Mn extends cs {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(), this.isPlaying = !1, this.text = t, this.x = e || 0, this.y = n || 0, this.width = r || 0, this.height = i || 0;
  }
  showCover() {
    this.isPlaying = !1, this._matrixDirty = !0;
  }
  play() {
    var t = Ce;
    this[t(185)] = !0, this._video[t(179)]()[t(191)]((e) => {
    }), this._matrixDirty = !0;
  }
  pause() {
    this[Ce(185)] = !1, this._video.pause(), this._matrixDirty = !0;
  }
  setVideo(t) {
    var e = Ce;
    const n = this;
    if (this[e(180)] != null && (this[e(180)][e(188)](), this[e(180)] = null), typeof t == "string") {
      this[e(187)] = t;
      let r = ze.createVideo(t, function() {
        n.autoplay && n.play();
      });
      r[e(199)](e(179), function() {
        var i = e;
        n.dispatchEvent(new Ge(i(179)));
      }, !1), r.addEventListener("pause", function() {
        n.dispatchEvent(new Ge("pause"));
      }, !1), r.addEventListener(e(205), function() {
        n.dispatchEvent(new Ge("ended"));
      }, !1), this[e(204)] = r, this._dom = this[e(204)];
    } else
      this._video = t, this._videoSrc = t.firstElementChild.getAttribute("src");
    this._video.width = this.width, this[e(204)][e(197)] = this.height, this._matrixDirty = !0;
  }
  addEventListener(t, e) {
    super.addEventListener(t, e);
  }
  removeEventListener(t, e) {
    super.removeEventListener(t, e);
  }
  _strokeAndFill(t) {
    var e = Ce;
    let n = this[e(196)];
    t.save(), (n.hasBorder || n.hasBackgroundColor) && this[e(184)](t);
    let r = this[e(185)] ? this[e(204)] : this[e(206)];
    if (r != null) {
      let i = this._drawContentDesc.shapeSize;
      t[e(194)](r, 0.5 * -i.width, 0.5 * -i.height, i[e(201)], i.height);
    }
    t[e(189)]();
  }
  _afterUpdateMatrix() {
    var t = Ce;
    super._afterUpdateMatrix(), this._video != null && this._video[t(201)] != this.width && (this._video.width = this.width, this._video[t(197)] = this.height);
  }
  [Pe(200)]() {
    var t = Pe;
    super.destroy(), this._dom && this[t(180)].remove();
  }
}
br([p("VideoNode")], Mn.prototype, "className", 2), br([p(!1)], Mn[Pe(202)], Pe(207), 2), br([p(C[Pe(202)]._serializers.concat([Pe(207), "videoSrc"]))], Mn.prototype, "_serializers", 2), Object.defineProperties(Mn.prototype, { videoSrc: { get() {
  return this[Pe(187)];
}, set(s) {
  this[Pe(192)](s);
} } });
var Yn = Ko;
(function() {
  for (var s = Ko, t = Zo(); ; )
    try {
      if (-parseInt(s(294)) / 1 + parseInt(s(308)) / 2 + parseInt(s(311)) / 3 + -parseInt(s(303)) / 4 + parseInt(s(304)) / 5 + parseInt(s(296)) / 6 + -parseInt(s(301)) / 7 * (parseInt(s(310)) / 8) === 716634)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Ul = Object.defineProperty, Gl = Object.getOwnPropertyDescriptor;
function Ko(s, t) {
  var e = Zo();
  return (Ko = function(n, r) {
    return e[n -= 294];
  })(s, t);
}
function Zo() {
  var s = ["2660TGfFbo", "_strokeAndFill", "className", "shapeSize", "770346fgJKky", "width", "16KtcydL", "1660131EFAzAN", "993184oipZwl", "_drawBackgroundOrBorder", "6938670vZpRjT", "_drawContentDesc", "CanvasNode", "height", "onSizeChanged", "1132698XWokXf", "canvas", "248324HCamng"];
  return (Zo = function() {
    return s;
  })();
}
class Ph extends C {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(t, e, n, r, i);
  }
  [Yn(305)](t) {
    var e = Yn;
    let n = this[e(297)];
    if (t.save(), (n.hasBorder || n.hasBackgroundColor) && this[e(295)](t), this[e(302)] != null) {
      let r = this[e(297)][e(307)];
      (this.canvas.width != r.width || this.canvas.height != r.height) && this[e(300)](r.width, r[e(299)]), t.drawImage(this.canvas, 0.5 * -r[e(309)], 0.5 * -r[e(299)], r.width, r.height);
    }
    t.restore();
  }
  setCanvas(t) {
    this[Yn(302)] = t;
  }
  onSizeChanged(t, e) {
    this.canvas != null && (this.canvas.width = t, this.canvas.height = e);
  }
}
function Qo() {
  const s = ["shape", "749200DvVFIq", "hasBorder", "_drawBackgroundOrBorder", "1494sNPUwr", "getShape", "prototype", "contains", "ShapeNode", "hitTest", "46628SoUuSe", "length", "get", "16ajKWhY", "aabb", "407010lnsavN", "213717xKmxPW", "_beforeToJSON", "_localToNormal", "_toJSON", "_drawContentDesc", "objJson", "shapeIndexMap", "389695yXohjL", "_fromJSON", "push", "173ZzVCEm", "_shape", "shapes", "lineWidth", "draw", "12JatLOr", "width", "_getOBBPoints", "521217sYQQxP", "vertices", "_isTextBlank", "setShape", "points", "drawShape"];
  return (Qo = function() {
    return s;
  })();
}
((s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Gl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  n && i && Ul(t, e, i);
})([p(Yn(298))], Ph.prototype, Yn(306), 2);
const st = ur;
(function() {
  const s = ur, t = Qo();
  for (; ; )
    try {
      if (-parseInt(s(355)) / 1 * (parseInt(s(373)) / 2) + -parseInt(s(360)) / 3 * (-parseInt(s(379)) / 4) + -parseInt(s(352)) / 5 + parseInt(s(344)) / 6 + parseInt(s(345)) / 7 * (parseInt(s(342)) / 8) + parseInt(s(363)) / 9 + parseInt(s(370)) / 10 === 101188)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Vl = Object.defineProperty, ql = Object.getOwnPropertyDescriptor, wr = (s, t, e, n) => {
  const r = ur;
  for (var i, o = n > 1 ? void 0 : n ? ql(t, e) : t, a = s[r(340)] - 1; a >= 0; a--)
    (i = s[a]) && (o = (n ? i(t, e, o) : i(o)) || o);
  return n && o && Vl(t, e, o), o;
};
function ur(s, t) {
  const e = Qo();
  return (ur = function(n, r) {
    return e[n -= 340];
  })(s, t);
}
class Cs extends C {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(t, e, n, r, i);
  }
  get shape() {
    return this._shape;
  }
  set [st(369)](t) {
    t !== this[st(356)] && (this._matrixDirty = !0), this._shape = t;
  }
  [st(366)](t) {
    this._shape = t, this._matrixDirty = !0;
  }
  [st(378)](t, e) {
    const n = st;
    if (!this[n(365)]() && this._getTextAABB()[n(376)](t, e))
      return !0;
    if (!this._obb[n(343)].contains(t, e))
      return !1;
    if (!this[n(349)][n(371)] && this[n(356)] instanceof ne) {
      let r = this.worldToLocalXY(t, e), i = this._localToNormal(r.x, r.y);
      if (this._shape.isClosed)
        return ot.isPointInPolygon(i, this[n(356)][n(364)]);
      let o = Math.max(this._pickPrecision, this._computedStyle[n(358)] || 1), a = this[n(347)](o, 0).x;
      return Yt.isPointOnLineSegs(i, this._shape.vertices, !1, a);
    }
    return ot.isPointInPolygon({ x: t, y: e }, this._obb[n(367)]);
  }
  [st(362)]() {
    const t = st;
    if (this[t(356)] instanceof ne) {
      this._updateShapeSize();
      let e = this[t(349)].shapeSize, n = 0.5 * e[t(361)], r = 0.5 * e.height;
      return this._shape.vertices.map((i, o) => ({ x: i.x * n, y: i.y * r }));
    }
    return super._getOBBPoints();
  }
  _strokeAndFill(t) {
    const e = st;
    let n = this._drawContentDesc;
    t.save(), (n[e(371)] || n.hasBackgroundColor) && this[e(372)](t), this.drawShape(t), t.restore();
  }
  [st(368)](t) {
    const e = st;
    this._shape[e(359)](t, this);
  }
  _beforeToJSON(t) {
    const e = st;
    super[e(346)](t);
    let n = this[e(369)];
    if (t[e(351)][e(341)](n) == null) {
      let r = t.shapes.length;
      t[e(351)].set(n, r), t[e(357)][e(354)](n.toJSON());
    }
  }
  [st(348)](t) {
    const e = st;
    let n = super._toJSON(t);
    if (t != null) {
      let r = t.shapeIndexMap;
      if (this._shape != null) {
        let i = r[e(341)](this._shape);
        n.shape = i;
      }
    }
    return n;
  }
  _fromJSON(t) {
    const e = st;
    if (super[e(353)](t), t.objJson.shape != null) {
      let n = t.shapeIndexMap.get(t[e(350)][e(369)]);
      this.setShape(n);
    }
  }
}
wr([p(st(377))], Cs.prototype, "className", 2), wr([p(os[st(374)]("Rect"))], Cs[st(375)], st(356), 2), wr([p(3)], Cs[st(375)], "_pickPrecision", 2);
const ye = ta;
function $o() {
  const s = ["height", "204637eNdWsc", "shapeSize", "defineProperty", "671331uZdFoE", "imageObject", "2536386pQjhfN", "15156072uxrhjz", "_drawImage", "7042826KZYsPd", '" height="', "290iSYbgE", "_matrixDirty", "_html", "1422052uIoEvd", "className", "10nunJpM", "replace", "prototype", "_drawBackgroundOrBorder", "10bzcEzc", "setHtml", "src", "1070442nCjaYl", "width"];
  return ($o = function() {
    return s;
  })();
}
function ta(s, t) {
  const e = $o();
  return (ta = function(n, r) {
    return e[n -= 140];
  })(s, t);
}
(function() {
  const s = ta, t = $o();
  for (; ; )
    try {
      if (-parseInt(s(163)) / 1 + parseInt(s(153)) / 2 * (-parseInt(s(141)) / 3) + -parseInt(s(151)) / 4 * (parseInt(s(157)) / 5) + parseInt(s(143)) / 6 + parseInt(s(146)) / 7 + -parseInt(s(144)) / 8 + parseInt(s(160)) / 9 * (parseInt(s(148)) / 10) === 948994)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Kl = Object[ye(140)], Zl = Object.getOwnPropertyDescriptor, Ua = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? Zl(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Kl(t, e, i), i;
};
class Xr extends C {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(t, e, n, r, i);
  }
  _strokeAndFill(t) {
    const e = ye;
    let n = this._drawContentDesc;
    t.save(), (n.hasBorder || n.hasBackgroundColor) && this[e(156)](t), this.imageObject != null && this[e(145)](t, this[e(142)]), t.restore();
  }
  _drawImage(t, e) {
    const n = ye;
    let r = this._drawContentDesc.shapeSize;
    t.drawImage(e, 0.5 * -r.width, 0.5 * -r[n(162)], r[n(161)], r.height);
  }
  [ye(158)](t) {
    t !== this._html && (this._html = t, this._updateImage());
  }
  _updateImage() {
    const t = ye;
    if (this.imageObject == null) {
      let r = new Image();
      this.imageObject = r;
    }
    let e = this._drawContentDesc.shapeSize, n = function(r, i, o, a) {
      const h = ye;
      let l = '<svg width="' + i + h(147) + o + '" viewBox="0 0 ' + i + " " + o + '" xmlns="http://www.w3.org/2000/svg"><foreignObject width="100%" height="100%"><html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><style>body{margin:0;padding:0;}</style>' + a + "</body></html></foreignObject></svg >";
      return "data:image/svg+xml;charset=UTF-8," + encodeURIComponent(l).replace(/'/g, "%27")[h(154)](/"/g, "%22");
    }(this[t(150)], e[t(161)], e[t(162)], this[t(150)]);
    this.imageObject.onload = () => {
      this[t(149)] = !0;
    }, this.imageObject[t(159)] = n;
  }
  _afterUpdateMatrix() {
    const t = ye;
    if (super._afterUpdateMatrix(), this.imageObject == null)
      return;
    let e = this._drawContentDesc[t(164)];
    (this[t(142)].width !== e.width || this[t(142)].height !== e.height) && this._updateImage();
  }
  get html() {
    return this._html;
  }
  set html(t) {
    t !== this._html && this.setHtml(t);
  }
}
function ea() {
  var s = ["997972muZCon", "LShapeLink", "3bQhdSQ", "5794836CiFaiS", "prototype", "20xYTmpk", "15aPvnuo", "4855608rlRiBb", "horizontal", "middle", "className", "484476oBKpbx", "points", "3393379vIOuvT", "_direction", "_serializers", "631216LVwyEb", "7iparpk", "58544gtlMOS"];
  return (ea = function() {
    return s;
  })();
}
Ua([p("HtmlNode")], Xr.prototype, ye(152), 2), Ua([p(C.prototype._serializers.concat(["html"]))], Xr[ye(155)], "_serializers", 2);
var ie = pr;
(function() {
  for (var s = pr, t = ea(); ; )
    try {
      if (parseInt(s(435)) / 1 + -parseInt(s(428)) / 2 * (-parseInt(s(438)) / 3) + -parseInt(s(436)) / 4 * (parseInt(s(423)) / 5) + parseInt(s(439)) / 6 + parseInt(s(434)) / 7 * (parseInt(s(433)) / 8) + parseInt(s(424)) / 9 + parseInt(s(441)) / 10 * (-parseInt(s(430)) / 11) === 519545)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Ql = Object.defineProperty, $l = Object.getOwnPropertyDescriptor, ws = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? $l(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && Ql(t, e, i), i;
};
function pr(s, t) {
  var e = ea();
  return (pr = function(n, r) {
    return e[n -= 423];
  })(s, t);
}
class zn extends B {
  constructor(t, e, n, r, i) {
    super(t, e, n, r, i);
  }
  getSegmentCount() {
    return 2;
  }
  _updatePoints() {
    var t = pr;
    const e = this._calcAZ(), n = e[0], r = e[1];
    let i;
    i = n.x == r.x || n.y == r.y ? A[t(426)](n, r) : this.direction == Bt[t(425)] ? { x: r.x, y: n.y } : { x: n.x, y: r.y };
    let o = this._state[t(429)];
    return o.length = 0, o.push(n, i, r), o;
  }
  get direction() {
    return this._direction;
  }
  set direction(t) {
    this._direction = t;
  }
}
ws([p(ie(437))], zn[ie(440)], ie(427), 2), ws([p(B.prototype[ie(432)].concat(["direction"]))], zn[ie(440)], ie(432), 2), ws([p([0, 1])], zn[ie(440)], "_middleIndex", 2), ws([p(Bt[ie(425)])], zn[ie(440)], ie(431), 2);
const ht = na;
function na(s, t) {
  const e = sa();
  return (na = function(n, r) {
    return e[n -= 173];
  })(s, t);
}
(function() {
  const s = na, t = sa();
  for (; ; )
    try {
      if (-parseInt(s(179)) / 1 * (parseInt(s(175)) / 2) + parseInt(s(184)) / 3 * (-parseInt(s(193)) / 4) + parseInt(s(197)) / 5 + parseInt(s(187)) / 6 * (-parseInt(s(191)) / 7) + parseInt(s(182)) / 8 + -parseInt(s(198)) / 9 * (-parseInt(s(176)) / 10) + -parseInt(s(199)) / 11 === 228604)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var tc = Object[ht(180)], ec = Object.getOwnPropertyDescriptor, vr = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? ec(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && tc(t, e, i), i;
};
function sa() {
  const s = ["424352IFJUoL", "10500sHACte", "_pickPrecision", "contains", "1PeTvMH", "defineProperty", "horizontal", "664136mEPogj", "length", "5181mQbJCU", "getPoint", "translateWith", "24762NUHUrb", "direction", "lineWidth", "ctrlPoint", "7WKptDP", "prototype", "312zLqfwy", "getPoints", "aabb", "_getOBBPoints", "1705790YbzzdA", "3528MbtRDd", "2817782mtifSA", "_serializers", "getCtrlPoint", "points", "push", "getLocalPoint", "_obb"];
  return (sa = function() {
    return s;
  })();
}
class Ds extends B {
  constructor(t, e, n, r, i) {
    const o = ht;
    super(t, e, n, r, i), this[o(188)] = o(181);
  }
  _updatePoints() {
    const t = ht;
    let e = this._calcAZ(), n = e[0], r = e[1], i = this[t(201)](n.x, n.y, r.x, r.y), o = this._state.points;
    return o[t(183)] = 0, o[t(203)](n, i, r), o;
  }
  translateWith(t, e) {
    return super[ht(186)](t, e), this.ctrlPoint != null && (this.ctrlPoint.x += t, this.ctrlPoint.y += e), this;
  }
  autoCalcCtrlPoint(t, e, n, r) {
    let i = (t + n) / 2, o = (e + r) / 2;
    return this.direction == Bt.horizontal ? o += (r - e) / 2 : o -= (r - e) / 2, { x: i, y: o };
  }
  getCtrlPoint(t, e, n, r) {
    return this[ht(190)] != null ? this.ctrlPoint : this.autoCalcCtrlPoint(t, e, n, r);
  }
  setCtrlPoint(t) {
    this.ctrlPoint = t, this._matrixDirty = !0;
  }
  resetCtrlPoint() {
    this.ctrlPoint = void 0, this._matrixDirty = !0;
  }
  [ht(196)]() {
    const t = ht;
    this.points = this._updatePoints();
    let e = this.points;
    const n = js._getQuadBezierExtremas(e[0], e[1], e[2]);
    if (n[t(183)] == 0)
      return e;
    let r = [e[0], e[2]];
    for (let i = 0; i < n.length; i++)
      r.push(this.getPoint(n[i]));
    return r;
  }
  getPoint(t) {
    let e = this[ht(194)](), n = e[0], r = e[1], i = e[2], o = (1 - t) * (1 - t);
    return { x: o * n.x + 2 * (1 - t) * t * r.x + t * t * i.x, y: o * n.y + 2 * (1 - t) * t * r.y + t * t * i.y };
  }
  [ht(173)](t, e) {
    return this.getPoint(t);
  }
  _getBeginVec() {
    const t = ht;
    let e = this[t(202)][0], n = this[t(185)](0.01), r = [e.x - n.x, e.y - n.y];
    return j.normalize(r, r);
  }
  _getEndVec() {
    const t = ht;
    let e = this[t(185)](0.9), n = this.points[this[t(202)].length - 1], r = [n.x - e.x, n.y - e.y];
    return j.normalize(r, r);
  }
  hitTest(t, e) {
    const n = ht;
    if (this._preHitTest(t, e))
      return !0;
    let r = this[n(174)][n(195)], i = this.getComputedStyle()[n(189)] || 0, o = Math.max(0.5 * i, this[n(177)]);
    if (!r[n(178)](t, e, o))
      return !1;
    let a = this.worldToLocalXY(t, e);
    return this._measureDistance(a.x, a.y).dist < o;
  }
  _measureDistance(t, e) {
    let n = this.getPoints(), r = n[0], i = n[1], o = n[2];
    return js._measureDistance(t, e, r.x, r.y, i.x, i.y, o.x, o.y);
  }
}
vr([p(Dt.QuadBezierLink)], Ds.prototype, "className", 2), vr([p(new js())], Ds[ht(192)], "_shape", 2), vr([p(B.prototype[ht(200)].concat([ht(188), Z[ht(190)]]))], Ds.prototype, "_serializers", 2);
var Le = ia;
function ra() {
  var s = ["1317765YIjKok", "35OisEck", "354010FqAhXm", "12lFSpZp", "arrowsSize", "_serializers", "4350492NhcAAx", "3026516FTuGMK", "900920WTrzkp", "21zkWonj", "83060cjTtEH", "6yIHxcV", "getOwnPropertyDescriptor", "38311iWppEP", "concat", "275KRfjHt", "9996XNaxMx", "getShape", "resizeToFitText", "prototype"];
  return (ra = function() {
    return s;
  })();
}
function ia(s, t) {
  var e = ra();
  return (ia = function(n, r) {
    return e[n -= 181];
  })(s, t);
}
(function() {
  for (var s = ia, t = ra(); ; )
    try {
      if (-parseInt(s(199)) / 1 * (-parseInt(s(188)) / 2) + -parseInt(s(189)) / 3 * (parseInt(s(185)) / 4) + parseInt(s(198)) / 5 * (-parseInt(s(181)) / 6) + parseInt(s(187)) / 7 * (parseInt(s(186)) / 8) + -parseInt(s(184)) / 9 + -parseInt(s(200)) / 10 * (parseInt(s(193)) / 11) + -parseInt(s(194)) / 12 * (-parseInt(s(191)) / 13) === 837469)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var nc = Object.defineProperty, sc = Object[Le(190)], vs = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? sc(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && nc(t, e, i), i;
};
class jn extends qe {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    super(t, e, n, r, i), this.originPosition = "cb";
  }
  [Le(196)]() {
    const t = this.arrowsSize == null ? 8 : this.arrowsSize;
    let e = this._computedStyle.computePadding();
    return this._width = this._textWidth + e, this._height = this._textHeight + e + t, this;
  }
}
vs([p("TipNode")], jn.prototype, "className", 2), vs([p(8)], jn.prototype, Le(182), 2), vs([p(os[Le(195)]("Tip"))], jn[Le(197)], "_shape", 2), vs([p(qe[Le(197)]._serializers[Le(192)](["arrowsSize"]))], jn.prototype, Le(183), 2);
const ce = oa;
function oa(s, t) {
  const e = aa();
  return (oa = function(n, r) {
    return e[n -= 463];
  })(s, t);
}
(function() {
  const s = oa, t = aa();
  for (; ; )
    try {
      if (parseInt(s(465)) / 1 + -parseInt(s(470)) / 2 + parseInt(s(466)) / 3 + -parseInt(s(480)) / 4 + parseInt(s(471)) / 5 + parseInt(s(464)) / 6 + -parseInt(s(469)) / 7 * (parseInt(s(472)) / 8) === 308018)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var rc = Object.defineProperty, ic = Object.getOwnPropertyDescriptor, _s = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? ic(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && rc(t, e, i), i;
};
class Bn extends B {
  constructor(t, e, n, r, i) {
    super(t, e, n, r, i);
  }
  [ce(463)]() {
    return 4;
  }
  [ce(481)](t, e) {
    let n = (e.y - t.y) / 2, r = (e.x - t.x) / 2;
    return this._direction == Bt.horizontal ? { x: t.x + r, y: t.y } : { x: t.x, y: t.y + n };
  }
  getFold2(t, e) {
    let n = (e.y - t.y) / 2, r = (e.x - t.x) / 2;
    return this._direction == Bt.horizontal ? { x: e.x - r, y: e.y } : { x: e.x, y: e.y - n };
  }
  [ce(473)]() {
    const t = ce, e = this[t(467)](), n = e[0], r = e[1];
    let i = this.getFold1(n, r), o = this[t(479)](n, r);
    const a = [n, i, { x: (i.x + o.x) / 2, y: (i.y + o.y) / 2 }, o, r];
    if (this.points = a, this.endArrow) {
      let h = a[t(476)] - 2;
      this.endArrow[t(475)](0, h);
    }
    return a;
  }
  get direction() {
    return this._direction;
  }
  set direction(t) {
    this[ce(478)] = t;
  }
}
function aa() {
  const s = ["getFold2", "1439428rezeDu", "getFold1", "getSegmentCount", "3207654PYhVRe", "690uMwMzB", "535281txtLvR", "_calcAZ", "_middleIndex", "7xmhrFx", "1108546WdiJUz", "2605400RfnLJs", "101264pqLdgB", "_updatePoints", "className", "setOriginOnLink", "length", "prototype", "_direction"];
  return (aa = function() {
    return s;
  })();
}
function ha() {
  const s = ["frame_height", "nodes", "neighbors", "363742ttuekZ", "edges", "4201881mOMCuW", "16bBOKxQ", "2HHyXBf", "addNode", "_fid_", "gravity", "attractiveForce", "4797240PWBsYe", "applyForce", "590qHqApC", "36157AOHwte", "59906oXPWyi", "mass", "travel", "maxForceDistance", "1194DbpQty", "addLink", "5TxpJmL", "getLink", "doLayout", "7088706NdIVcq", "force", "originEdges", "selectedNode", "796504IanbBc", "initialize"];
  return (ha = function() {
    return s;
  })();
}
_s([p("ZShapeLink")], Bn[ce(477)], ce(474), 2), _s([p(B.prototype._serializers.concat(["direction"]))], Bn.prototype, "_serializers", 2), _s([p([1, 0.5])], Bn[ce(477)], ce(468), 2), _s([p(Bt.horizontal)], Bn[ce(477)], "_direction", 2);
const xt = ns;
(function() {
  const s = ns, t = ha();
  for (; ; )
    try {
      if (-parseInt(s(441)) / 1 + -parseInt(s(445)) / 2 * (-parseInt(s(443)) / 3) + parseInt(s(436)) / 4 * (parseInt(s(429)) / 5) + -parseInt(s(427)) / 6 * (parseInt(s(454)) / 7) + -parseInt(s(444)) / 8 * (-parseInt(s(432)) / 9) + parseInt(s(452)) / 10 * (parseInt(s(453)) / 11) + -parseInt(s(450)) / 12 === 902400)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var Jr = function() {
};
function ns(s, t) {
  const e = ha();
  return (ns = function(n, r) {
    return e[n -= 424];
  })(s, t);
}
Jr.prototype = { calculate: function(s, t) {
  this.dx = s.x - t.x, this.dy = s.y - t.y, this.d2 = this.dx * this.dx + this.dy * this.dy, this.d = Math.sqrt(this.d2);
} };
class oc {
  constructor(t, e, n) {
    this[ns(434)] = [], this.uuid = 0, this.frame_width = e, this.frame_height = n, this.origin = t, this.initialize();
    let r = this;
    le.travel(t, function(i, o) {
      i._fid_ = ++r.uuid;
    }), this.initNodes(t);
  }
  initNodes(t) {
    const e = ns;
    let n = this;
    le[e(425)](t, function(r, i) {
      const o = e;
      if (r.isNode && i != null) {
        let a = i, h = r;
        a == t && n.setOriginEdgeWeight(h, n.originWeight);
        let l = 1 | h.mass;
        n.addNode(h, l);
        let c = 30;
        n[o(428)](a, h, c);
      }
    });
  }
  [xt(437)]() {
    const t = xt;
    this.originWeight = 48, this.speed = 12, this.gravity = 50, this.maxForceDistance = 512, this[t(439)] = new Array(), this[t(442)] = new Array(), this.originEdges = new Array();
  }
  originForce(t, e) {
    const n = xt;
    if (this.originEdges[t._fid_]) {
      if (t[n(447)] != this.selectedNode) {
        let r = this.originEdges[t._fid_], i = (e.d - r) / r;
        t[n(433)].x += i * (e.dx / e.d), t.force.y += i * (e.dy / e.d);
      }
    } else if (t._fid_ != this.selectedNode) {
      let r = this.gravity * t[n(424)] * this.origin.mass / e.d2, i = this.maxForceDistance - e.d;
      i > 0 && (r *= Math.log(i)), r < 1024 && (t.force.x -= r * e.dx / e.d, t.force.y -= r * e.dy / e.d);
    }
  }
  [xt(449)](t, e, n) {
    const r = xt;
    let i = this.edges[t._fid_][e[r(447)]];
    if (i += 3 * (t.neighbors + e.neighbors), i) {
      let o = (n.d - i) / i;
      t._fid_ != this[r(435)] && (t.force.x -= o * n.dx / n.d, t.force.y -= o * n.dy / n.d), e._fid_ != this.selectedNode && (e[r(433)].x += o * n.dx / n.d, e.force.y += o * n.dy / n.d);
    }
  }
  repulsiveForce(t, e, n) {
    const r = xt;
    let i = this[r(448)] * t.mass * e[r(424)] / n.d2, o = this[r(426)] - n.d;
    o > 0 && (i *= Math.log(o)), i < 1024 && (t.force.x += i * n.dx / n.d, t.force.y += i * n.dy / n.d);
  }
  [xt(431)]() {
    this.applyForce();
  }
  [xt(451)]() {
    const t = xt;
    for (let e = 0; e < this.nodes.length; e++) {
      let n = this.nodes[e];
      for (let i = 0; i < this.nodes.length; i++)
        if (e != i) {
          let o = this.nodes[i], a = new Jr();
          a.calculate(n, o), this[t(430)](n._fid_, o[t(447)]) != null && this.attractiveForce(n, o, a), e != this[t(435)] && this.repulsiveForce(n, o, a);
        }
      let r = new Jr();
      r.calculate(this.origin, n), this.originForce(n, r), n.force.x *= this.speed, n.force.y *= this.speed, n.x += n.force.x, n.y += n.force.y, n.force.x = 0, n.force.y = 0;
    }
  }
  bounds(t) {
    const e = xt;
    let n = t.x, r = t.x + 28, i = t.y, o = t.y + 28;
    n < 0 && (t.x = 0), i < 0 && (t.y = 0), r > this.frame_width && (t.x = this.frame_width - 28), o > this[e(438)] && (t.y = this.frame_height - 28);
  }
  setOriginEdgeWeight(t, e) {
    this.originEdges[t._fid_] = e;
  }
  [xt(446)](t, e) {
    const n = xt;
    t.mass = 1 | e, t[n(440)] = 0 | t.neighbors, t[n(433)] = { x: 0, y: 0 }, this[n(439)].push(t);
  }
  getLink(t, e) {
    let n = this[xt(442)][t];
    return n == null ? null : n[e];
  }
  [xt(428)](t, e, n) {
    const r = xt;
    !this.edges[t._fid_] && (this.edges[t._fid_] = new Object()), this.edges[t._fid_][e._fid_] = n;
    try {
      t.neighbors++, e[r(440)]++;
    } catch (i) {
      console.log("Error Adding Edge: " + i);
    }
  }
}
const ue = la;
(function() {
  const s = la, t = ca();
  for (; ; )
    try {
      if (-parseInt(s(351)) / 1 * (parseInt(s(332)) / 2) + parseInt(s(328)) / 3 * (-parseInt(s(339)) / 4) + -parseInt(s(347)) / 5 + parseInt(s(355)) / 6 * (parseInt(s(337)) / 7) + -parseInt(s(330)) / 8 * (-parseInt(s(350)) / 9) + parseInt(s(352)) / 10 + parseInt(s(329)) / 11 * (parseInt(s(338)) / 12) === 788876)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var ac = Object[ue(346)], hc = Object.getOwnPropertyDescriptor, Ss = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? hc(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && ac(t, e, i), i;
};
function la(s, t) {
  const e = ca();
  return (la = function(n, r) {
    return e[n -= 328];
  })(s, t);
}
class Wn extends B {
  constructor(t, e, n, r, i) {
    super(t, e, n, r, i);
  }
  getPoint(t) {
    const e = ue;
    let n = this.getPoints(), r = n[0], i = n[n.length - 1], o = (r.x + i.x) / 2, a = (r.y + i.y) / 2, h = r.x - i.x, l = r.y - i.y, c = Math.sqrt(h * h + l * l) / 2, u = Math.atan2(l, h), d = u + Math.PI * t;
    return this.direction === Bt[e(349)] && (d = u - Math.PI * t), { x: o + c * Math[e(334)](d), y: a + c * Math.sin(d) };
  }
  getLocalPoint(t, e) {
    return this.getPoint(t);
  }
  _getOBBPoints() {
    const t = ue;
    this.points = this[t(331)]();
    let e = this[t(335)][0], n = this[t(335)][this.points.length - 1], r = [e];
    {
      let i = [], o = { x: 0.5 * (e.x + n.x), y: 0.5 * (e.y + n.y) }, a = 0.5 * A.distance(e.x, e.y, n.x, n.y);
      i.push({ x: o.x, y: o.y - a }), i.push({ x: o.x, y: o.y + a }), i.push({ x: o.x - a, y: o.y }), i.push({ x: o.x + a, y: o.y });
      for (let h = 0; h < i[t(342)]; h++)
        this._inArcSide(e, n, i[h]) && r[t(341)](i[h]);
    }
    return r[t(341)](n), r;
  }
  _updatePoints() {
    return this[ue(348)]();
  }
  hitTest(t, e) {
    const n = ue;
    if (this._preHitTest(t, e))
      return !0;
    let r = this._obb.aabb, i = this[n(343)]().lineWidth || 0, o = Math.max(0.5 * i, this._pickPrecision);
    if (!r.contains(t, e, o))
      return !1;
    let a = this._obb[n(333)], h = a[0], l = a[a.length - 1], c = 0.5 * (h.x + l.x), u = 0.5 * (h.y + l.y), d = this.worldToLocalXY(t, e), f = A[n(344)](d.x, d.y, c, u), x = 0.5 * A[n(344)](h.x, h.y, l.x, l.y);
    return !(Math.abs(f - x) >= o) && this[n(340)](h, l, d);
  }
  [ue(340)](t, e, n) {
    let r = [e.x - t.x, e.y - t.y], i = [n.x - t.x, n.y - t.y], o = j.cross(r, i);
    return this.direction === Bt.anticlockwise ? o > 0 : o < 0;
  }
  _measureDistance(t, e, n) {
    let r = 0.5 * (t.x + e.x), i = 0.5 * (t.y + e.y), o = 0.5 * A.distance(t.x, t.y, e.x, e.y), a = A.distance(n.x, n.y, r, i), h = Math.atan2(t.y - i, t.x - r), l = (Math.atan2(n.y - i, n.x - r) - h) / Math.PI;
    return !this._inArcSide(t, e, n) && (a += o, l = 0), { dist: Math.abs(a - o), t: l };
  }
}
function ca() {
  const s = ["push", "length", "getComputedStyle", "distance", "prototype", "defineProperty", "3879685oCEcze", "_calcAZ", "anticlockwise", "54fklezG", "1527817fdacNv", "11869730HtUZJy", "_serializers", "ArcLink", "7425552xHBXec", "1365933AsFZZW", "63514APcjLj", "242952zaMcmh", "_updatePoints", "2JLjfma", "localPoints", "cos", "points", "clockwise", "7tkwhHt", "1956BDbwdn", "4vhnpyu", "_inArcSide"];
  return (ca = function() {
    return s;
  })();
}
Ss([p(Dt[ue(354)])], Wn.prototype, "className", 2), Ss([p(new ph())], Wn.prototype, "_shape", 2), Ss([p(B.prototype[ue(353)].concat(["direction"]))], Wn.prototype, "_serializers", 2), Ss([p(Bt[ue(336)])], Wn[ue(345)], "direction", 2);
const lt = ua;
function ua(s, t) {
  const e = pa();
  return (ua = function(n, r) {
    return e[n -= 450];
  })(s, t);
}
(function() {
  const s = ua, t = pa();
  for (; ; )
    try {
      if (parseInt(s(458)) / 1 + parseInt(s(470)) / 2 + -parseInt(s(450)) / 3 + -parseInt(s(465)) / 4 + -parseInt(s(454)) / 5 * (-parseInt(s(460)) / 6) + -parseInt(s(475)) / 7 * (parseInt(s(467)) / 8) + parseInt(s(455)) / 9 === 460363)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var lc = Object[lt(459)], cc = Object[lt(457)], _r = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? cc(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && lc(t, e, i), i;
};
function pa() {
  const s = ["calcCtrlPoint2", "_autoCalcCtrlPoint", "820226jeWTKU", "_calcAZ", "getPoint", "_preHitTest", "_obb", "49112FSZbMZ", "ctrlPoint2", "_getCubicBezierExtremas", "calcCtrlPoint1", "_shape", "1129488ZZvNMK", "hitTest", "prototype", "worldToLocalXY", "5crQFel", "11650086FzyoBb", "resetCtrlPoint", "getOwnPropertyDescriptor", "82518OzUUJV", "defineProperty", "431736iyjOCM", "ctrlPoint1", "_measureDistance", "length", "getComputedStyle", "412344LjRQJp", "points", "1048LyykkA"];
  return (pa = function() {
    return s;
  })();
}
class As extends B {
  constructor(t, e, n, r, i) {
    super(t, e, n, r, i);
  }
  translateWith(t, e) {
    const n = lt;
    return super.translateWith(t, e), this.ctrlPoint1 != null && (this.ctrlPoint1.x += t, this.ctrlPoint1.y += e), this[n(476)] != null && (this.ctrlPoint2.x += t, this.ctrlPoint2.y += e), this;
  }
  setCtrlPoint1(t) {
    this.ctrlPoint1 = t, this._matrixDirty = !0;
  }
  setCtrlPoint2(t) {
    this.ctrlPoint2 = t, this._matrixDirty = !0;
  }
  _autoCalcCtrlPoint(t, e, n) {
    let r = e.x - t.x, i = e.y - t.y;
    return { x: (e.x + t.x) / 2 + 0.382 * r, y: (e.y + t.y) / 2 - 0.382 * i };
  }
  [lt(478)](t, e, n) {
    return this[lt(461)] != null ? this.ctrlPoint1 : this._autoCalcCtrlPoint(t, n, e);
  }
  calcCtrlPoint2(t, e, n) {
    const r = lt;
    return this[r(476)] != null ? this.ctrlPoint2 : this[r(469)](e, n, t);
  }
  [lt(456)]() {
    const t = lt;
    this[t(461)] = void 0, this[t(476)] = void 0, this._matrixDirty = !0;
  }
  _getOBBPoints() {
    const t = lt;
    this.points = this._updatePoints();
    let e = this[t(466)];
    const n = Bs[t(477)](e[0], e[1], e[3], e[4]);
    if (n.length == 0)
      return e;
    let r = [e[0], e[4]];
    for (let i = 0; i < n.length; i++)
      r.push(this[t(472)](n[i]));
    return r;
  }
  getPoint(t) {
    let e = this.getPoints(), n = e[0], r = e[1], i = e[3], o = e[4], a = (1 - t) * (1 - t) * (1 - t), h = 3 * (1 - t) * (1 - t) * t, l = 3 * (1 - t) * t * t, c = t * t * t;
    return { x: a * n.x + h * r.x + l * i.x + c * o.x, y: a * n.y + h * r.y + l * i.y + c * o.y };
  }
  getLocalPoint(t, e) {
    return this.getPoint(t);
  }
  _updatePoints() {
    const t = lt;
    let e = this._state.points;
    e[t(463)] = 0;
    const n = this[t(471)](), r = n[0], i = n[1];
    let o = { x: (r.x + i.x) / 2, y: (r.y + i.y) / 2 }, a = this.calcCtrlPoint1(r, i, o), h = this[t(468)](r, i, o);
    return e.push(r, a, o, h, i), e;
  }
  [lt(451)](t, e) {
    const n = lt;
    if (this[n(473)](t, e))
      return !0;
    let r = this[n(474)].aabb, i = this[n(464)]().lineWidth || 0, o = Math.max(0.5 * i, this._pickPrecision);
    if (!r.contains(t, e, o))
      return !1;
    let a = this[n(453)](t, e);
    return this._measureDistance(a.x, a.y).dist < o;
  }
  _measureDistance(t, e) {
    const n = lt;
    let r = this.getPoints(), i = r[0], o = r[1], a = r[3], h = r[4];
    return Bs[n(462)](t, e, i.x, i.y, o.x, o.y, a.x, a.y, h.x, h.y);
  }
}
_r([p(Dt.BezierLink)], As.prototype, "className", 2), _r([p(new Bs())], As.prototype, lt(479), 2), _r([p(B.prototype._serializers.concat([Z[lt(461)], Z.ctrlPoint2]))], As[lt(452)], "_serializers", 2);
var Sr = da;
(function() {
  for (var s = da, t = fa(); ; )
    try {
      if (-parseInt(s(156)) / 1 * (parseInt(s(164)) / 2) + -parseInt(s(158)) / 3 * (-parseInt(s(161)) / 4) + parseInt(s(154)) / 5 + -parseInt(s(166)) / 6 * (parseInt(s(157)) / 7) + parseInt(s(153)) / 8 + parseInt(s(168)) / 9 * (-parseInt(s(159)) / 10) + -parseInt(s(162)) / 11 === 912924)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var uc = Object.defineProperty, pc = Object.getOwnPropertyDescriptor;
function da(s, t) {
  var e = fa();
  return (da = function(n, r) {
    return e[n -= 153];
  })(s, t);
}
class Lh extends B {
  constructor(t, e, n, r, i) {
    super(t, e, n, r, i);
  }
  [Sr(163)]() {
    var t = Sr;
    const e = this.path.anchorProxyList;
    for (let n = 1; n < e[t(155)] - 1; n++) {
      let r = e[n];
      r.isDisplayObjectHost() && r.host.removeOutLink(this);
    }
    e.length = 0;
  }
  setPath(t) {
    var e = Sr;
    if (t[e(155)] < 2)
      throw new Error(e(167));
    this.clearPath();
    let n = t.map((r) => {
      var i = e;
      if (r instanceof N)
        return r;
      if (r instanceof C)
        return r.getAnchor(te.center);
      if (A[i(165)](r)) {
        let o = r;
        return new N(new ut(o.x, o.y));
      }
      throw new Error("unknow target type:" + r);
    });
    super[e(160)](n), this._matrixDirty = !0;
  }
}
function fa() {
  var s = ["6844855FIcIpL", "length", "2085nszNxw", "49315HbXgTf", "1003281RSuoxi", "170wrGwYs", "_setProxies", "20VAiseu", "24634412lAwhgD", "clearPath", "336hzmnWP", "isLikePoint", "42apjDoE", "path length is less than 2", "394677PgaRYD", "10051248PfQWjr"];
  return (fa = function() {
    return s;
  })();
}
((s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? pc(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  n && i && uc(t, e, i);
})([p("PathLink")], Lh.prototype, "className", 2);
const rn = ga;
function ga(s, t) {
  const e = ya();
  return (ga = function(n, r) {
    return e[n -= 311];
  })(s, t);
}
(function() {
  const s = ga, t = ya();
  for (; ; )
    try {
      if (-parseInt(s(319)) / 1 + -parseInt(s(322)) / 2 * (-parseInt(s(323)) / 3) + -parseInt(s(317)) / 4 + parseInt(s(313)) / 5 * (-parseInt(s(324)) / 6) + -parseInt(s(316)) / 7 + parseInt(s(318)) / 8 + -parseInt(s(326)) / 9 * (-parseInt(s(320)) / 10) === 920440)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Ga = [rn(312), "#2d2e36", "#FA7E23", "#FF9900", "#FED71A", rn(314), "#248067", rn(311), "#5e5314", "#1ba784", rn(315), "#4E7ca1", "#2474b5", rn(325), "#346c9c", "#61649f", "#C06f98", rn(321), "#681752", "#EE3f4d", "#C02c38"];
function ya() {
  const s = ["9hJYDci", "#12A182", "#475164", "610fIAnKl", "#2bae85", "#0f1423", "11615373XdXMMG", "5304848NoJHdw", "6013944XPqUGp", "436295cwQGCU", "36720660WuIoWh", "#7e2065", "1032346RQizeZ", "9cldUED", "80166nDmRVI", "#2775B6"];
  return (ya = function() {
    return s;
  })();
}
function dc() {
  let s = Math.random() * Ga.length | 0;
  return Ga[s];
}
const $ = dr;
(function() {
  const s = dr, t = ma();
  for (; ; )
    try {
      if (parseInt(s(176)) / 1 + parseInt(s(201)) / 2 * (parseInt(s(165)) / 3) + -parseInt(s(174)) / 4 + parseInt(s(185)) / 5 * (parseInt(s(197)) / 6) + parseInt(s(190)) / 7 + parseInt(s(194)) / 8 + parseInt(s(198)) / 9 * (-parseInt(s(187)) / 10) === 588008)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var fc = Object.defineProperty, gc = Object.getOwnPropertyDescriptor, on = (s, t, e, n) => {
  const r = dr;
  for (var i, o = n > 1 ? void 0 : n ? gc(t, e) : t, a = s[r(196)] - 1; a >= 0; a--)
    (i = s[a]) && (o = (n ? i(t, e, o) : i(o)) || o);
  return n && o && fc(t, e, o), o;
};
function ma() {
  const s = ["push", "_needCalcOffset", "3114034aDldFX", "centerOffset", "concat", "fold1", "9213432muBPUR", "beginOffsetGap", "length", "657450ZOlSrl", "13563sVvHOT", "getSegmentCount", "setFold1Offset", "2044762OMsQrP", "normalize", "isHorizontal", "prototype", "3oyHLhU", "absorb", "end", "fold2Offset", "_calcFold1", "center", "_matrixDirty", "sign", "toFixed", "3966960DJmNOe", "begin", "10134ezCmtj", "host", "getAngle", "_preAngle", "_calcFold2Dir", "endOffsetGap", "getK", "_calcFold2", "abs", "5tgoCkA", "points", "7690lRTvJw"];
  return (ma = function() {
    return s;
  })();
}
function dr(s, t) {
  const e = ma();
  return (dr = function(n, r) {
    return e[n -= 162];
  })(s, t);
}
class me extends B {
  constructor(t, e, n, r, i) {
    super(t, e, n, r, i), this.absorb = Q.AutoFoldLinkAbsorb;
  }
  [$(199)]() {
    return 5;
  }
  getCtrlPoints() {
    const t = $;
    let e = A.mergeClosestPoints(this.points).length;
    return e < 4 ? [Z[t(175)], Z.end] : e == 4 || e == 5 ? [Z[t(175)], Z.end, Z[t(193)], Z.fold2] : [Z.begin, Z[t(167)], Z.fold1, Z.fold2, Z.middle];
  }
  setBeginOffsetGap(t) {
    this.beginOffsetGap = t, this._matrixDirty = !0;
  }
  setEndOffsetGap(t) {
    this.endOffsetGap = t, this._matrixDirty = !0;
  }
  [$(169)](t, e) {
    let n = this.beginOffsetGap, r = this._calcFold1Dir(t, e), i = { x: t.x + r[0] * n, y: t.y + r[1] * n }, o = this.fold1Offset;
    return o && (i.x += o.x, i.y += o.y), i;
  }
  _calcFold2(t, e) {
    const n = $;
    let r = this[n(181)], i = this[n(180)](t, e), o = { x: e.x + i[0] * r, y: e.y + i[1] * r }, a = this.fold2Offset;
    return a && (o.x += a.x, o.y += a.y), o;
  }
  _calcFold1Dir(t, e) {
    const n = $;
    let r = qa(this[n(175)]);
    return r[0] == 0 && r[1] == 0 && (r = j[n(162)]([], [e.x - t.x, 0])), r;
  }
  _calcFold2Dir(t, e) {
    let n = qa(this[$(167)]);
    return n[0] == 0 && n[1] == 0 && (n = j.normalize([], [t.x - e.x, 0])), n;
  }
  _updatePoints() {
    const t = $, e = this._calcAZ();
    let n = e[0], r = e[1];
    const i = this[t(166)];
    let o = this._calcFold1Dir(n, r);
    if (o[0] == 0 && Math.abs(n.x - r.x) < i) {
      let f = 0.5 * (n.x + r.x);
      n.x = f, r.x = f;
    }
    if (o[1] == 0 && Math[t(184)](n.y - r.y) < i) {
      let f = 0.5 * (n.y + r.y);
      n.y = f, r.y = f;
    }
    let a = this[t(169)](n, r), h = this[t(183)](n, r);
    const l = function(f, x, m, I, y) {
      const S = $;
      let v = f._calcFold1Dir(x, m), L = f._calcFold2Dir(x, m);
      const w = j.dot(v, L);
      if (w > 0) {
        const R = kr(I, y, v, L);
        return [R, R];
      }
      if (w < 0) {
        const R = A.middle(I, y);
        return [kr(I, R, v, v), kr(y, R, L, L)];
      }
      const T = Yt.getLineIntersectPoint(x, I, m, y, !0);
      return T == null ? Math.abs(x.x - I.x) < 1e-7 && Math[S(184)](x.y - I.y) < 1e-7 ? [x, I] : Math.abs(m.x - y.x) < 1e-7 && Math.abs(m.y - y.y) < 1e-7 ? [m, y] : [x, m] : [T, T];
    }(this, n, r, a, h);
    let c = l[0], u = l[1];
    {
      if (A.looksSame(c, u, 0.5) == 0) {
        const x = Math[t(184)](A[t(178)](c.x, c.y, u.x, u.y))[t(173)](6);
        this._preAngle != null && this._preAngle != x && (this[t(191)] = null), this[t(179)] = x;
      }
      let f = this.centerOffset;
      f && (c.x += f.x, c.y += f.y, u.x += f.x, u.y += f.y);
    }
    let d = this._state.points;
    return d.length = 0, d[t(188)](n, a, c, u, h, r), d;
  }
  _afterUpdateMatrix() {
    const t = $;
    super._afterUpdateMatrix(), this[t(189)]() && (this[t(186)] = this._updatePoints());
  }
  [$(200)](t, e) {
    const n = $;
    let r = this.fold1Offset;
    r == null && (r = { x: 0, y: 0 }, this.fold1Offset = r), Yt[n(163)](this.getK(0.5, 0)) ? (r.y = 0, e = 0) : (r.x = 0, t = 0), r.x += t, r.y += e, this._matrixDirty = !0;
  }
  setFold2Offset(t, e) {
    const n = $;
    let r = this[n(168)];
    r == null && (r = { x: 0, y: 0 }, this[n(168)] = r), Yt.isHorizontal(this[n(182)](0.5, 4)) ? (r.y = 0, e = 0) : (r.x = 0, t = 0), r.x += t, r.y += e, this._matrixDirty = !0;
  }
  setCenterOffset(t, e) {
    const n = $;
    let r = this.centerOffset;
    r == null && (r = { x: 0, y: 0 }, this.centerOffset = r), Yt.isHorizontal(this[n(182)](0.5, 2)) ? (r.x = 0, t = 0) : (r.y = 0, e = 0), r.x += t, r.y += e, this[n(171)] = !0;
  }
  resetOffset() {
    const t = $;
    this.centerOffset = void 0, this.fold1Offset = null, this.fold2Offset = null, this[t(171)] = !0;
  }
}
function Va(s, t) {
  const e = $;
  return Math.abs(t[0]) > Math[e(184)](t[1]) ? s.x * Math[e(172)](t[0]) : s.y * Math.sign(t[1]);
}
function kr(s, t, e, n) {
  let r = Va(s, e), i = Va(t, n), o = e[0] != 0;
  return r > i ? o ? { x: s.x, y: t.y } : { x: t.x, y: s.y } : o ? { x: t.x, y: s.y } : { x: s.x, y: t.y };
}
function qa(s, t, e) {
  const n = $;
  let r = s.anchor, i = s.host, o = [0, 0];
  if (r instanceof Ae)
    o = r.getNormal();
  else if (r instanceof bt)
    o = r.getNormal();
  else if (r instanceof Gt) {
    let a = r.segIndex, h = r.t, l = i.getLocalPoint(h, a);
    if (i instanceof C) {
      let c = i._positionToLocalPoint(te[n(170)]), u = l.x - c.x, d = l.y - c.y;
      o = Math[n(184)](u) > Math.abs(d) ? [Math.sign(u), 0] : [0, Math.sign(d)];
    } else if (i instanceof B) {
      let c = i.points[a], u = i[n(186)][a + 1];
      o = j.normalize([], [u.x - c.x, u.y - c.y]), o = [-o[1], o[0]];
    }
  }
  return s[n(177)] && s.host.scaleX < 0 && (o[0] = -o[0]), s.host && s[n(177)].scaleY < 0 && (o[1] = -o[1]), o = Math[n(184)](o[0]) > Math.abs(o[1]) ? [Math.sign(o[0]), 0] : [0, Math[n(172)](o[1])], o;
}
on([p(Dt.AutoFoldLink)], me.prototype, "className", 2), on([p(new uh())], me.prototype, "_shape", 2), on([p(15)], me.prototype, "beginOffsetGap", 2), on([p([2, 0.5])], me[$(164)], "_middleIndex", 2), on([p(15)], me.prototype, $(181), 2), on([p(B[$(164)]._serializers[$(192)]([$(195), "endOffsetGap", Dt.fold1Offset, Dt.fold2Offset, Dt.centerOffset]))], me.prototype, "_serializers", 2);
const rt = fr;
(function() {
  const s = fr, t = xa();
  for (; ; )
    try {
      if (parseInt(s(404)) / 1 * (-parseInt(s(398)) / 2) + -parseInt(s(428)) / 3 + -parseInt(s(417)) / 4 * (-parseInt(s(425)) / 5) + parseInt(s(401)) / 6 + -parseInt(s(420)) / 7 + parseInt(s(413)) / 8 + parseInt(s(408)) / 9 === 727431)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
var yc = Object.defineProperty, mc = Object[rt(426)], Ka = (s, t, e, n) => {
  for (var r, i = n > 1 ? void 0 : n ? mc(t, e) : t, o = s.length - 1; o >= 0; o--)
    (r = s[o]) && (i = (n ? r(t, e, i) : r(i)) || i);
  return n && i && yc(t, e, i), i;
};
function fr(s, t) {
  const e = xa();
  return (fr = function(n, r) {
    return e[n -= 397];
  })(s, t);
}
function xa() {
  const s = ["concat", "_serializers", "8525691CRWPfW", "_frameCount", "_frameHeight", "_frameIndex", "update", "4968776zKiVTa", "_currentFrame", "autoSize", "play", "4VIhvWy", "imageObject", "frameCount", "3085747nvoKQq", "width", "resize", "duration", "_timer", "4975665eLfwIu", "getOwnPropertyDescriptor", "frameIndex", "4056495mQBWqv", "_autoSize", "4126gOxojq", "totalColumns", "_frameWidth", "644922YLhReB", "height", "_duration", "73mTiPGV", "prototype"];
  return (xa = function() {
    return s;
  })();
}
class Yr extends cs {
  constructor(t, e = 0, n = 0, r = 1, i = 1) {
    const o = rt;
    super(t, e, n, r, i), this._frameIndex = 0, this._frameCount = 1, this.totalRows = 1, this.totalColumns = 1, this._frameWidth = 1, this._frameHeight = 1, this._duration = 1e3, this[o(414)] = 0, this._autoSize = !0;
  }
  changeSprite(t) {
    const e = rt;
    t[e(427)] != null && (this.frameIndex = t.frameIndex), t.frameCount != null && (this.frameCount = t.frameCount), t[e(423)] != null && (this.duration = t[e(423)]), this._currentFrame = this.frameIndex, this.update();
  }
  setSprite(t, e) {
    const n = rt;
    return this._frameIndex = e[n(427)] || 0, this._frameCount = e.frameCount || 1, this.totalRows = e.totalRows || 1, this.totalColumns = e.totalColumns || 1, e.duration != null && (this._duration = e.duration), this._currentFrame = this[n(411)], this.setImage(t, !0);
  }
  setImage(t, e) {
    let n = this;
    return super.setImage(t, e).then((r) => {
      const i = fr;
      return r instanceof HTMLImageElement && (n._frameWidth = r.width / this[i(399)], n._frameHeight = r[i(402)] / this.totalRows, this[i(397)] && n.resizeToFrame(), n.play()), r;
    });
  }
  _drawImage(t, e) {
    const n = rt;
    let r = this._drawContentDesc.shapeSize, i = Math.floor(this[n(414)] / this.totalColumns), o = this._currentFrame % this[n(399)] * this._frameWidth, a = i * this[n(410)], h = 0.5 * -r.width, l = 0.5 * -r.height;
    t.drawImage(e, o, a, this[n(400)], this._frameHeight, h, l, r[n(421)], r[n(402)]);
  }
  resizeToFrame() {
    const t = rt;
    return this.imageObject != null && this.imageObject[t(421)] != this[t(400)] && this[t(418)].height != this._frameHeight && this[t(422)](this._frameWidth, this._frameHeight), this;
  }
  [rt(416)]() {
    const t = rt;
    let e = this;
    return this._frameCount <= 1 || (this.pause(), this[t(424)] = setInterval(() => {
      e._frameCount <= 1 || e._duration <= 0 || (e._currentFrame++, e._currentFrame >= e._frameIndex + e._frameCount && (e._currentFrame = e._frameIndex), e.update());
    }, this[t(403)] / this._frameCount), e[t(412)]()), this;
  }
  pause() {
    return clearInterval(this[rt(424)]), this;
  }
  update() {
    super.update(), this._autoSize && this.resizeToFrame();
  }
  set frameIndex(t) {
    const e = rt;
    t !== this[e(411)] && (this._frameIndex = Math.max(0, t), this[e(414)] = this[e(411)], this.update());
  }
  get frameIndex() {
    return this._frameIndex;
  }
  set frameCount(t) {
    const e = rt;
    t !== this._frameCount && (this[e(409)] = Math.max(1, t), this._currentFrame = this[e(411)], this[e(412)]());
  }
  get [rt(419)]() {
    return this._frameCount;
  }
  set duration(t) {
    t !== this._duration && (this._duration = t, this.update());
  }
  get duration() {
    return this._duration;
  }
  set autoSize(t) {
    this._autoSize = t, t && this.resizeToFrame();
  }
  get [rt(415)]() {
    return this._autoSize;
  }
  destroy() {
    super.destroy(), this.pause();
  }
}
Ka([p("SpriteNode")], Yr.prototype, "className", 2), Ka([p(cs[rt(405)][rt(407)][rt(406)](["frameIndex", rt(419), "totalRows", rt(399), "duration", "autoSize"]))], Yr.prototype, "_serializers", 2);
const D = ba;
(function() {
  const s = ba, t = Ia();
  for (; ; )
    try {
      if (parseInt(s(507)) / 1 + -parseInt(s(505)) / 2 * (-parseInt(s(488)) / 3) + parseInt(s(482)) / 4 + -parseInt(s(497)) / 5 * (parseInt(s(515)) / 6) + -parseInt(s(476)) / 7 + parseInt(s(511)) / 8 * (-parseInt(s(489)) / 9) + parseInt(s(501)) / 10 * (parseInt(s(491)) / 11) === 359539)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})(), [new bt(Zt.lt, G[D(493)]), new bt(Zt.rt, G.ADJUST), new bt(Zt.lb, G[D(493)]), new bt(Zt.rb, G.ADJUST), new bt(Zt.lm, G.CONNECT_EDIT), new bt(Zt.ct, G.CONNECT_EDIT), new bt(Zt.rm, G[D(496)]), new bt(Zt.cb, G.CONNECT_EDIT), new bt(Zt[D(492)], G[D(493)]), new Vn(Zt.auto)].forEach((s) => {
  const t = D;
  $e.DefaultAnchors[t(478)](s.name, s);
}), z._sysRegFunction(et.LinkBegin, (s) => s.points[0]), z._sysRegFunction(et[D(503)], (s) => {
  const t = D;
  return s.points[s.points[t(516)] - 1];
}), z[D(504)](et.LinkCenter, (s) => s.getPoint(0.5));
let ps = new St(et.LinkBegin, G.CONNECT_EDIT | G.ADJUST);
ps[D(494)] = function(s, t, e) {
  const n = D;
  t[n(510)].isPointerDown && (s instanceof me && s[n(487)](), s.setBegin({ x: e.x, y: e.y }), s.updateMatrix());
};
let ss = new St(et[D(503)], G[D(496)] | G[D(493)]);
function Ia() {
  const s = ["getPoints", "LinkEnd", "_sysRegFunction", "10aiSGSf", "getK", "539160VlRdfK", "updateMatrix", "calcPointByAnchor", "inputSystem", "664JPNrZt", "ctrlPoint", "BezierLinkCtrlPoint2", "n_resize", "25458pLJuSe", "length", "4726232qxTLtG", "AutoFoldLinkCenter", "set", "ctrlPoint1", "name", "setCursor", "834232Scylpr", "ctrlPoint2", "AutoFoldLinkFold2", "AutoFoldLinkFold1", "e_resize", "resetOffset", "242205OryiuY", "18882artuar", "DefaultAnchors", "901175XXOUBR", "center", "ADJUST", "pointermoveHandler", "points", "CONNECT_EDIT", "415GbbKJc", "setCtrlPoint1", "QuadBezierLinkCtrlPoint", "isPointerDown", "50qTqBDj"];
  return (Ia = function() {
    return s;
  })();
}
ss.pointermoveHandler = function(s, t, e) {
  const n = D;
  t.inputSystem.isPointerDown && (s instanceof me && s.resetOffset(), s.setEnd({ x: e.x, y: e.y }), s[n(508)]());
}, [ps, ss, new St(et.LinkCenter, G.CONNECT)].forEach((s) => {
  const t = D;
  wn[t(490)].set(s[t(480)], s);
});
{
  z._sysRegFunction(et.AutoFoldLinkCenter, (n) => {
    const r = D;
    return A.middle(n[r(495)][2], n[r(495)][3]);
  }), z._sysRegFunction(et[D(485)], (n) => n.points[1]), z[D(504)](et.AutoFoldLinkFold2, (n) => n[D(495)][4]);
  let s = new St(et.AutoFoldLinkFold1, G.ADJUST);
  s.pointermoveHandler = function(n, r, i) {
    const o = D;
    if (r.inputSystem.isPointerDown) {
      let c = N[o(509)](n, this);
      const u = i.x - c.x, d = i.y - c.y;
      return n.setFold1Offset(u, d), void n[o(508)]();
    }
    let a = n.points[0], h = n.points[1], l = null;
    l = Yt.isHorizontal(n.getK(0.5, 0)) ? h.x > a.x ? it.w_resize : it.e_resize : h.y > a.y ? it.s_resize : it.n_resize, r.setCursor(l);
  };
  let t = new St(et[D(484)], G[D(493)]);
  t[D(494)] = function(n, r, i) {
    const o = D;
    if (r[o(510)][o(500)]) {
      let u = N.calcPointByAnchor(n, this);
      const d = i.x - u.x, f = i.y - u.y;
      return n.setFold2Offset(d, f), void n.updateMatrix();
    }
    const a = Yt.isHorizontal(n[o(506)](0.5, 4));
    let h = n[o(495)][4], l = n[o(495)][5], c = null;
    c = a ? h.x > l.x ? it.w_resize : it[o(486)] : h.y > l.y ? it.s_resize : it[o(514)], r[o(481)](c);
  };
  let e = new St(et[D(477)], G.ADJUST);
  e.pointermoveHandler = function(n, r, i) {
    const o = D;
    if (r.inputSystem.isPointerDown) {
      let h = N.calcPointByAnchor(n, this);
      const l = i.x - h.x, c = i.y - h.y;
      return n.setCenterOffset(l, c), void n.updateMatrix();
    }
    let a = null;
    a = Yt.isHorizontal(n.getK(0.5, 2)) ? it.s_resize : it[o(486)], r.setCursor(a);
  }, [ps, ss, new Gt(Z.mid1, 1, 1), new Gt(Z.mid2, 1, 2), s, t, e].forEach((n) => {
    const r = D;
    uh.DefaultAnchors[r(478)](n.name, n);
  });
}
function ba(s, t) {
  const e = Ia();
  return (ba = function(n, r) {
    return e[n -= 476];
  })(s, t);
}
{
  z[D(504)](et[D(499)], (t) => {
    if (t.ctrlPoint != null)
      return t.ctrlPoint;
    let e = t.getPoints();
    return t.getCtrlPoint(e[0].x, e[0].y, e[2].x, e[2].y);
  });
  let s = new St(et[D(499)], G[D(493)]);
  s.pointermoveHandler = function(t, e, n) {
    const r = D;
    e.inputSystem.isPointerDown && (t.ctrlPoint == null ? t.setCtrlPoint(N.calcPointByAnchor(t, this)) : (t.ctrlPoint.x += n.x - t[r(512)].x, t[r(512)].y += n.y - t[r(512)].y, t.setCtrlPoint(t.ctrlPoint)));
  }, [ps, ss, s, new St(et.LinkCenter, G.CONNECT)].forEach((t) => {
    js[D(490)].set(t.name, t);
  });
}
{
  z._sysRegFunction(et.BezierLinkCtrlPoint1, (e) => {
    const n = D;
    return e[n(479)] != null ? e.ctrlPoint1 : e[n(502)]()[1];
  }), z._sysRegFunction(et.BezierLinkCtrlPoint2, (e) => e.ctrlPoint2 != null ? e.ctrlPoint2 : e.getPoints()[3]);
  let s = new St(et.BezierLinkCtrlPoint1, G.ADJUST);
  s[D(494)] = function(e, n, r) {
    const i = D;
    n.inputSystem.isPointerDown && (e[i(479)] == null ? e[i(498)](N[i(509)](e, this)) : (e[i(479)].x += r.x - e.ctrlPoint1.x, e.ctrlPoint1.y += r.y - e[i(479)].y, e[i(498)](e[i(479)])));
  };
  let t = new St(et[D(513)], G.ADJUST);
  t[D(494)] = function(e, n, r) {
    const i = D;
    n.inputSystem[i(500)] && (e.ctrlPoint2 == null ? e.setCtrlPoint2(N.calcPointByAnchor(e, this)) : (e.ctrlPoint2.x += r.x - e.ctrlPoint2.x, e.ctrlPoint2.y += r.y - e.ctrlPoint2.y, e.setCtrlPoint2(e[i(483)])));
  }, [ps, ss, s, t].forEach((e) => {
    Bs.DefaultAnchors.set(e.name, e);
  });
}
function Oh(s, t) {
  var e = wa();
  return (Oh = function(n, r) {
    return e[n -= 102];
  })(s, t);
}
function wa() {
  var s = ["393632uimHKS", "792036zXnQPi", "2825196IDdmlz", "5SvPYAf", "265769axqRry", "286908sNanmZ", "10680219njNDsd", "40ORgUDF", "364959dIzImW"];
  return (wa = function() {
    return s;
  })();
}
(function() {
  for (var s = Oh, t = wa(); ; )
    try {
      if (parseInt(s(104)) / 1 + -parseInt(s(105)) / 2 + -parseInt(s(106)) / 3 + -parseInt(s(107)) / 4 + -parseInt(s(108)) / 5 * (parseInt(s(110)) / 6) + -parseInt(s(109)) / 7 * (-parseInt(s(103)) / 8) + parseInt(s(102)) / 9 === 526540)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})();
const Pr = Object.freeze(Object.defineProperty({ __proto__: null, AENode: $n, Anchor: vt, AnchorProxy: N, AnchorUsageType: G, Animation: hh, ArcLink: Wn, ArrowShape: zi, Assets: os, AssetsClass: ah, AutoAnchor: Vn, AutoFoldLink: me, BezierLink: As, Camera: _h, CameraEvent: vh, CanvasNode: Ph, Collection: jt, ConnectToNodePosition: Zt, Cursor: it, Debug: Fn, DefaultDarkTheme: Fr, DefaultLightTheme: Xn, DiamondShape: ji, Direction: Bt, DomUtil: ze, Edge: Br, EllipseNode: Hr, EllipseShape: Ni, EventBase: Ge, EventTarget: we, FixedPointAnchor: ut, FontInfo: Fe, FontUtil: Lr, ForceDirectLayout: oc, FunctionAnchor: St, FunctionName: et, GeomUtils: ot, Graph: Zn, GraphSystem: mn, HandlerLayer: ar, HtmlNode: Xr, ImageNode: cs, ImageUtil: Hn, InputEvent: vl, InputSystem: fh, Intersect: Qe, JTType: Ch, Keyboard: gh, LShapeLink: zn, Layer: ct, Layout: Ts, LayoutSystem: bh, LinearGradient: Tn, Link: B, LinkConst: Dt, LinkPosition: Z, NDCAnchor: Ae, NE: at, NEHelper: ls, Node: C, NodeHelper: le, NodePositionAnchor: bt, OBB: pe, ObjectName: Eh, Observable: Ne, Path: ml, PathLink: Lh, Point: A, PolygonShape: ne, QuadBezierLink: Ds, RadialGradient: Cn, RectPosition: te, RectPositionNormalized: Ns, RectPositionUnitNormals: Kr, RectShape: Us, Rectangle: E, RegShape: rh, RegSystem: z, ResourceSystem: pt, ResourceSystemBase: Qa, SegmentAnchor: Gt, SelectedGroup: kh, SerializerSystem: Ms, Shape: $e, ShapeBuilder: Ue, ShapeNode: Cs, SpriteNode: Yr, Stage: lr, StageEvent: Jn, StageMode: Jt, Style: Ut, StylePattern: fe, StyleSystem: wh, TextAlign: Mt, TextBaseline: zt, TextNode: qe, TextPosition: Ht, Theme: vn, ThemeContent: Mo, TipNode: jn, TipShape: Bi, Transform: wt, TriangleShape: Mi, VERSION: Ws, Vertext: pn, VideoNode: Mn, ZShapeLink: Bn, _V: Th, convertToAnchorProxy: jr, copyKeyboardEvent: Wr, copyMouseEvent: wl, distance: hn, geom: Yt, newtonsMethod: Pi, pointIntersectNode: Xh, randomColor: dc, setProto: p, util: be, vec2: j }, Symbol.toStringTag, { value: "Module" })), de = va;
function va(s, t) {
  const e = _a();
  return (va = function(n, r) {
    return e[n -= 164];
  })(s, t);
}
function _a() {
  const s = ["844806SPrKjs", "1784279QukruN", "10goukBh", "FixedPointAnchor", "14962SXfHsR", "2966843BcUuKs", "10SpIESB", "Layer", "FunctionAnchor", "645968fYOuMh", "VideoNode", "436EhXOiu", "AutoFoldLink", "2561472WmtLvR", "59fjbtiQ", "HtmlNode", "6177zdLwzE", "RegSystem", "BezierLink", "ArcLink"];
  return (_a = function() {
    return s;
  })();
}
(function() {
  const s = va, t = _a();
  for (; ; )
    try {
      if (-parseInt(s(165)) / 1 * (parseInt(s(175)) / 2) + parseInt(s(167)) / 3 * (parseInt(s(182)) / 4) + parseInt(s(173)) / 5 * (parseInt(s(171)) / 6) + parseInt(s(172)) / 7 + -parseInt(s(180)) / 8 + -parseInt(s(164)) / 9 + -parseInt(s(177)) / 10 * (-parseInt(s(176)) / 11) === 223910)
        break;
      t.push(t.shift());
    } catch {
      t.push(t.shift());
    }
})(), ["Style", de(178), "Node", "TextNode", "ImageNode", de(181), "CanvasNode", "ShapeNode", de(166), "EllipseNode", "TipNode", "SpriteNode", "Link", "LShapeLink", "ZShapeLink", "QuadBezierLink", de(170), de(169), "PathLink", de(183), "NDCAnchor", de(174), "AutoAnchor", "SegmentAnchor", "NodePositionAnchor", de(179)].forEach((s) => {
  const t = de;
  Pr[s] == null && console.error("class not exist name:" + s);
  let e = Pr[s];
  e.prototype.className == null && console.error(".prototype.className is null:" + s), Pr[t(168)]._sysRegClass(e);
});
export {
  $n as AENode,
  vt as Anchor,
  N as AnchorProxy,
  G as AnchorUsageType,
  hh as Animation,
  Wn as ArcLink,
  zi as ArrowShape,
  os as Assets,
  ah as AssetsClass,
  Vn as AutoAnchor,
  me as AutoFoldLink,
  As as BezierLink,
  _h as Camera,
  vh as CameraEvent,
  Ph as CanvasNode,
  jt as Collection,
  Zt as ConnectToNodePosition,
  it as Cursor,
  Fn as Debug,
  Fr as DefaultDarkTheme,
  Xn as DefaultLightTheme,
  ji as DiamondShape,
  Bt as Direction,
  ze as DomUtil,
  Br as Edge,
  Hr as EllipseNode,
  Ni as EllipseShape,
  Ge as EventBase,
  we as EventTarget,
  ut as FixedPointAnchor,
  Fe as FontInfo,
  Lr as FontUtil,
  oc as ForceDirectLayout,
  St as FunctionAnchor,
  et as FunctionName,
  ot as GeomUtils,
  Zn as Graph,
  mn as GraphSystem,
  ar as HandlerLayer,
  Xr as HtmlNode,
  cs as ImageNode,
  Hn as ImageUtil,
  vl as InputEvent,
  fh as InputSystem,
  Qe as Intersect,
  Ch as JTType,
  gh as Keyboard,
  zn as LShapeLink,
  ct as Layer,
  Ts as Layout,
  bh as LayoutSystem,
  Tn as LinearGradient,
  B as Link,
  Dt as LinkConst,
  Z as LinkPosition,
  Ae as NDCAnchor,
  at as NE,
  ls as NEHelper,
  C as Node,
  le as NodeHelper,
  bt as NodePositionAnchor,
  pe as OBB,
  Eh as ObjectName,
  Ne as Observable,
  ml as Path,
  Lh as PathLink,
  A as Point,
  ne as PolygonShape,
  Ds as QuadBezierLink,
  Cn as RadialGradient,
  te as RectPosition,
  Ns as RectPositionNormalized,
  Kr as RectPositionUnitNormals,
  Us as RectShape,
  E as Rectangle,
  rh as RegShape,
  z as RegSystem,
  pt as ResourceSystem,
  Qa as ResourceSystemBase,
  Gt as SegmentAnchor,
  kh as SelectedGroup,
  Ms as SerializerSystem,
  $e as Shape,
  Ue as ShapeBuilder,
  Cs as ShapeNode,
  Yr as SpriteNode,
  lr as Stage,
  Jn as StageEvent,
  Jt as StageMode,
  Ut as Style,
  fe as StylePattern,
  wh as StyleSystem,
  Mt as TextAlign,
  zt as TextBaseline,
  qe as TextNode,
  Ht as TextPosition,
  vn as Theme,
  Mo as ThemeContent,
  jn as TipNode,
  Bi as TipShape,
  wt as Transform,
  Mi as TriangleShape,
  Ws as VERSION,
  pn as Vertext,
  Mn as VideoNode,
  Bn as ZShapeLink,
  Th as _V,
  jr as convertToAnchorProxy,
  Wr as copyKeyboardEvent,
  wl as copyMouseEvent,
  hn as distance,
  Yt as geom,
  Pi as newtonsMethod,
  Xh as pointIntersectNode,
  dc as randomColor,
  p as setProto,
  be as util,
  j as vec2
};
